COGNHACKER - LAB
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 1 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # Cognhacker
  2. ## Notes d’installation de la VM
  3. - Déploiement Ubuntu 22.04.1 LTS avec le package OpenSSH + Docker
  4. - Changement des MDP root et cognhacker
  5. - Installation d’utilitaires : ``apt install -y curl wget git screen htop vim nano sudo tree iperf3 unzip sshfs nmap apache2 network-manager net-tools``
  6. - MAJ et redémarrage
  7. - Mise en service d’apache et clone du site
  8. - ``echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf``
  9. ## Installation de WorkAdventure
  10. Quelques tutos :
  11. * https://shownotes.opensourceisawesome.com/virtual-office-to-virtual-meetings-with-workadventure/
  12. * https://wiki.techinc.nl/Work-Adventure/install
  13. * https://github.com/thecodingmachine/workadventure/tree/master/contrib/docker
  14. Création du **docker-compose.yml**
  15. ````
  16. version: "3.3"
  17. services:
  18. reverse-proxy:
  19. image: traefik:v2.5
  20. command:
  21. - --log.level=WARN
  22. - --providers.docker
  23. - --entryPoints.web.address=:80
  24. ports:
  25. - "9999:80"
  26. depends_on:
  27. - pusher
  28. - front
  29. volumes:
  30. - /var/run/docker.sock:/var/run/docker.sock
  31. restart: unless-stopped
  32. front:
  33. #build:
  34. # context: ./
  35. # dockerfile: front/Dockerfile
  36. image: thecodingmachine/workadventure-front:v1.12.11
  37. environment:
  38. DEBUG_MODE: "$DEBUG_MODE"
  39. JITSI_URL: $JITSI_URL
  40. JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE"
  41. PUSHER_URL: /pusher
  42. ADMIN_URL: /admin
  43. TURN_SERVER: "${TURN_SERVER}"
  44. TURN_USER: "${TURN_USER}"
  45. TURN_PASSWORD: "${TURN_PASSWORD}"
  46. MAX_PER_GROUP: "${MAX_PER_GROUP}"
  47. MAX_USERNAME_LENGTH: "${MAX_USERNAME_LENGTH}"
  48. START_ROOM_URL: "${START_ROOM_URL}"
  49. DISABLE_NOTIFICATIONS: "${DISABLE_NOTIFICATIONS}"
  50. SKIP_RENDER_OPTIMIZATIONS: "${SKIP_RENDER_OPTIMIZATIONS}"
  51. labels:
  52. - "traefik.http.routers.front.rule=PathPrefix(`/`)"
  53. - "traefik.http.routers.front.entryPoints=web"
  54. - "traefik.http.services.front.loadbalancer.server.port=80"
  55. - "traefik.http.routers.front.service=front"
  56. restart: unless-stopped
  57. pusher:
  58. #build:
  59. # context: ./
  60. # dockerfile: pusher/Dockerfile
  61. image: thecodingmachine/workadventure-pusher:v1.12.11
  62. environment:
  63. SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}"
  64. SECRET_KEY: ${SECRET_KEY}
  65. API_URL: back:50051
  66. ADMIN_API_URL: "${ADMIN_API_URL}"
  67. ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}"
  68. JITSI_URL: ${JITSI_URL}
  69. JITSI_ISS: ${JITSI_ISS}
  70. FRONT_URL : ${FRONT_URL}
  71. START_ROOM_URL: "${START_ROOM_URL}"
  72. labels:
  73. - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher"
  74. - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)"
  75. - "traefik.http.routers.pusher.middlewares=strip-pusher-prefix@docker"
  76. - "traefik.http.routers.pusher.entryPoints=web"
  77. - "traefik.http.services.pusher.loadbalancer.server.port=8080"
  78. - "traefik.http.routers.pusher.service=pusher"
  79. restart: unless-stopped
  80. back:
  81. #build:
  82. # context: ./
  83. # dockerfile: back/Dockerfile
  84. image: thecodingmachine/workadventure-back:v1.12.11
  85. environment:
  86. SECRET_KEY: ${SECRET_KEY}
  87. STARTUP_COMMAND_1: yarn install
  88. SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}"
  89. ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}"
  90. ADMIN_API_URL: "${ADMIN_API_URL}"
  91. JITSI_URL: ${JITSI_URL}
  92. JITSI_ISS: ${JITSI_ISS}
  93. MAX_PER_GROUP: ${MAX_PER_GROUP}
  94. TURN_STATIC_AUTH_SECRET: "${TURN_STATIC_AUTH_SECRET}"
  95. REDIS_HOST: redis
  96. labels:
  97. - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api"
  98. - "traefik.http.routers.back.rule=PathPrefix(`/api`)"
  99. - "traefik.http.routers.back.middlewares=strip-api-prefix@docker"
  100. - "traefik.http.routers.back.entryPoints=web"
  101. - "traefik.http.services.back.loadbalancer.server.port=8080"
  102. - "traefik.http.routers.back.service=back"
  103. restart: unless-stopped
  104. redis:
  105. image: redis:6
  106. restart: unless-stopped
  107. ````
  108. **.env**
  109. ````
  110. # The base domain
  111. DOMAIN=lab.cognhacker.net
  112. DEBUG_MODE=false
  113. JITSI_URL=meet.jit.si
  114. # If your Jitsi environment has authentication set up, you MUST set JITSI_PRIVATE_MODE to "true" and you MUST pass a SECRET_JITSI_KEY to generate the JWT secret
  115. JITSI_PRIVATE_MODE=false
  116. JITSI_ISS=
  117. SECRET_JITSI_KEY=
  118. # URL of the TURN server (needed to "punch a hole" through some networks for P2P connections)
  119. # TURN_SERVER=
  120. # TURN_USER=
  121. # TURN_PASSWORD=
  122. # The URL used by default, in the form: "/_/global/map/url.json"
  123. START_ROOM_URL=/_/global/cognhacker.github.io/wa/maps/lab.json
  124. # The email address used by Let's encrypt to send renewal warnings (compulsory)
  125. ACME_EMAIL=orga@cognhacker.net
  126. # Set to true to allow using this instance as a target for the apiUrl property
  127. FEDERATE_PUSHER=false
  128. # Server settings
  129. MAX_PER_GROUP=10
  130. MAX_USERNAME_LENGTH=12
  131. DISABLE_NOTIFICATIONS=false
  132. SKIP_RENDER_OPTIMIZATIONS=false
  133. # Enable / disable chat
  134. ENABLE_CHAT=false
  135. # Secrets
  136. SECRET_KEY="**********************"
  137. ADMIN_API_TOKEN="**********************"
  138. ADMIN_API_URL=
  139. ````
  140. Lancement :
  141. ````
  142. sudo docker-compose -f /home/cognhacker/docker-compose.yml up -d --build
  143. ````