COGNHACKER - LAB
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

install.md 5.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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``
  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 de l’arborescence :
  15. ````
  16. /root/
  17. ├── workad
  18. │   ├── docker-compose.yml
  19. │   └── .env
  20. /srv/
  21. └── www
  22. ├── .git
  23. ├── index.html
  24. └── README.md
  25. ````
  26. **docker-compose.yml**
  27. ````
  28. version: "3.3"
  29. services:
  30. reverse-proxy:
  31. image: traefik:v2.5
  32. command:
  33. - --log.level=WARN
  34. - --providers.docker
  35. - --entryPoints.web.address=:80
  36. ports:
  37. - "9999:80"
  38. depends_on:
  39. - pusher
  40. - front
  41. volumes:
  42. - /var/run/docker.sock:/var/run/docker.sock
  43. restart: unless-stopped
  44. front:
  45. #build:
  46. # context: ./
  47. # dockerfile: front/Dockerfile
  48. image: thecodingmachine/workadventure-front:v1.12.11
  49. environment:
  50. DEBUG_MODE: "$DEBUG_MODE"
  51. JITSI_URL: $JITSI_URL
  52. JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE"
  53. PUSHER_URL: /pusher
  54. ADMIN_URL: /admin
  55. TURN_SERVER: "${TURN_SERVER}"
  56. TURN_USER: "${TURN_USER}"
  57. TURN_PASSWORD: "${TURN_PASSWORD}"
  58. MAX_PER_GROUP: "${MAX_PER_GROUP}"
  59. MAX_USERNAME_LENGTH: "${MAX_USERNAME_LENGTH}"
  60. START_ROOM_URL: "${START_ROOM_URL}"
  61. DISABLE_NOTIFICATIONS: "${DISABLE_NOTIFICATIONS}"
  62. SKIP_RENDER_OPTIMIZATIONS: "${SKIP_RENDER_OPTIMIZATIONS}"
  63. labels:
  64. - "traefik.http.routers.front.rule=PathPrefix(`/`)"
  65. - "traefik.http.routers.front.entryPoints=web"
  66. - "traefik.http.services.front.loadbalancer.server.port=80"
  67. - "traefik.http.routers.front.service=front"
  68. restart: unless-stopped
  69. pusher:
  70. #build:
  71. # context: ./
  72. # dockerfile: pusher/Dockerfile
  73. image: thecodingmachine/workadventure-pusher:v1.12.11
  74. environment:
  75. SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}"
  76. SECRET_KEY: ${SECRET_KEY}
  77. API_URL: back:50051
  78. ADMIN_API_URL: "${ADMIN_API_URL}"
  79. ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}"
  80. JITSI_URL: ${JITSI_URL}
  81. JITSI_ISS: ${JITSI_ISS}
  82. FRONT_URL : ${FRONT_URL}
  83. START_ROOM_URL: "${START_ROOM_URL}"
  84. labels:
  85. - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher"
  86. - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)"
  87. - "traefik.http.routers.pusher.middlewares=strip-pusher-prefix@docker"
  88. - "traefik.http.routers.pusher.entryPoints=web"
  89. - "traefik.http.services.pusher.loadbalancer.server.port=8080"
  90. - "traefik.http.routers.pusher.service=pusher"
  91. restart: unless-stopped
  92. back:
  93. #build:
  94. # context: ./
  95. # dockerfile: back/Dockerfile
  96. image: thecodingmachine/workadventure-back:v1.12.11
  97. environment:
  98. SECRET_KEY: ${SECRET_KEY}
  99. STARTUP_COMMAND_1: yarn install
  100. SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}"
  101. ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}"
  102. ADMIN_API_URL: "${ADMIN_API_URL}"
  103. JITSI_URL: ${JITSI_URL}
  104. JITSI_ISS: ${JITSI_ISS}
  105. MAX_PER_GROUP: ${MAX_PER_GROUP}
  106. TURN_STATIC_AUTH_SECRET: "${TURN_STATIC_AUTH_SECRET}"
  107. REDIS_HOST: redis
  108. labels:
  109. - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api"
  110. - "traefik.http.routers.back.rule=PathPrefix(`/api`)"
  111. - "traefik.http.routers.back.middlewares=strip-api-prefix@docker"
  112. - "traefik.http.routers.back.entryPoints=web"
  113. - "traefik.http.services.back.loadbalancer.server.port=8080"
  114. - "traefik.http.routers.back.service=back"
  115. restart: unless-stopped
  116. redis:
  117. image: redis:6
  118. restart: unless-stopped
  119. ````
  120. **.env**
  121. ````
  122. # The base domain
  123. DOMAIN=lab.cognhacker.net
  124. DEBUG_MODE=false
  125. JITSI_URL=meet.jit.si
  126. # 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
  127. JITSI_PRIVATE_MODE=false
  128. JITSI_ISS=
  129. SECRET_JITSI_KEY=
  130. # URL of the TURN server (needed to "punch a hole" through some networks for P2P connections)
  131. # TURN_SERVER=
  132. # TURN_USER=
  133. # TURN_PASSWORD=
  134. # The URL used by default, in the form: "/_/global/map/url.json"
  135. START_ROOM_URL=/_/global/cognhacker.github.io/wa/maps/lab.json
  136. # The email address used by Let's encrypt to send renewal warnings (compulsory)
  137. ACME_EMAIL=orga@cognhacker.net
  138. # Set to true to allow using this instance as a target for the apiUrl property
  139. FEDERATE_PUSHER=false
  140. # Server settings
  141. MAX_PER_GROUP=10
  142. MAX_USERNAME_LENGTH=12
  143. DISABLE_NOTIFICATIONS=false
  144. SKIP_RENDER_OPTIMIZATIONS=false
  145. # Enable / disable chat
  146. ENABLE_CHAT=false
  147. # Secrets
  148. SECRET_KEY="**********************"
  149. ADMIN_API_TOKEN="**********************"
  150. ADMIN_API_URL=
  151. ````