2022-02-09 14:11:28 +01:00
|
|
|
version: "3.5"
|
2021-01-08 00:20:27 +01:00
|
|
|
services:
|
|
|
|
reverse-proxy:
|
2022-02-09 14:11:28 +01:00
|
|
|
image: traefik:v2.6
|
2021-01-08 00:20:27 +01:00
|
|
|
command:
|
2022-02-09 14:11:28 +01:00
|
|
|
- --log.level=${LOG_LEVEL}
|
2021-01-08 00:20:27 +01:00
|
|
|
- --providers.docker
|
2022-02-09 14:11:28 +01:00
|
|
|
# Entry points
|
|
|
|
- --entryPoints.web.address=:${HTTP_PORT}
|
2021-02-02 11:19:24 +01:00
|
|
|
- --entrypoints.web.http.redirections.entryPoint.to=websecure
|
|
|
|
- --entrypoints.web.http.redirections.entryPoint.scheme=https
|
2022-02-09 14:11:28 +01:00
|
|
|
- --entryPoints.websecure.address=:${HTTPS_PORT}
|
|
|
|
# HTTP challenge
|
2021-02-19 23:10:48 +01:00
|
|
|
- --certificatesresolvers.myresolver.acme.email=${ACME_EMAIL}
|
2021-02-02 11:19:24 +01:00
|
|
|
- --certificatesresolvers.myresolver.acme.storage=/acme.json
|
|
|
|
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
|
2022-02-09 14:11:28 +01:00
|
|
|
# Let's Encrypt's staging server
|
|
|
|
# uncomment during testing to avoid rate limiting
|
|
|
|
#- --certificatesresolvers.dnsresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
|
2021-01-08 00:20:27 +01:00
|
|
|
ports:
|
2022-02-09 14:11:28 +01:00
|
|
|
- "${HTTP_PORT}:80"
|
|
|
|
- "${HTTPS_PORT}:443"
|
2021-01-08 00:20:27 +01:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2022-02-09 14:11:28 +01:00
|
|
|
- ${DATA_DIR}/letsencrypt/acme.json:/acme.json
|
|
|
|
restart: ${RESTART_POLICY}
|
2021-02-02 11:19:24 +01:00
|
|
|
|
2021-01-08 00:20:27 +01:00
|
|
|
|
|
|
|
front:
|
2021-02-02 11:34:29 +01:00
|
|
|
build:
|
2021-02-03 12:29:41 +01:00
|
|
|
context: ../..
|
2021-02-02 11:34:29 +01:00
|
|
|
dockerfile: front/Dockerfile
|
2022-02-09 14:11:28 +01:00
|
|
|
#image: thecodingmachine/workadventure-front:${VERSION}
|
2021-02-02 11:19:24 +01:00
|
|
|
environment:
|
2022-02-09 14:11:28 +01:00
|
|
|
- DEBUG_MODE
|
|
|
|
- JITSI_URL
|
|
|
|
- JITSI_PRIVATE_MODE
|
|
|
|
- PUSHER_URL=//${PUSHER_HOST}
|
|
|
|
- ICON_URL=//${ICON_HOST}
|
|
|
|
- TURN_SERVER
|
|
|
|
- TURN_USER
|
|
|
|
- TURN_PASSWORD
|
|
|
|
- TURN_STATIC_AUTH_SECRET
|
|
|
|
- STUN_SERVER
|
|
|
|
- START_ROOM_URL
|
|
|
|
- SKIP_RENDER_OPTIMIZATIONS
|
|
|
|
- MAX_PER_GROUP
|
|
|
|
- MAX_USERNAME_LENGTH
|
|
|
|
- DISABLE_ANONYMOUS
|
|
|
|
- DISABLE_NOTIFICATIONS
|
2021-01-08 00:20:27 +01:00
|
|
|
labels:
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.front.rule=Host(`${FRONT_HOST}`)"
|
|
|
|
- "traefik.http.routers.front.entryPoints=web"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.services.front.loadbalancer.server.port=80"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.front-ssl.rule=Host(`${FRONT_HOST}`)"
|
2021-01-08 00:20:27 +01:00
|
|
|
- "traefik.http.routers.front-ssl.entryPoints=websecure"
|
|
|
|
- "traefik.http.routers.front-ssl.service=front"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.front-ssl.tls=true"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.routers.front-ssl.tls.certresolver=myresolver"
|
2022-02-09 14:11:28 +01:00
|
|
|
restart: ${RESTART_POLICY}
|
2021-01-08 00:20:27 +01:00
|
|
|
|
|
|
|
pusher:
|
2021-02-02 11:34:29 +01:00
|
|
|
build:
|
2021-02-03 12:29:41 +01:00
|
|
|
context: ../..
|
2021-02-02 11:34:29 +01:00
|
|
|
dockerfile: pusher/Dockerfile
|
2022-02-09 14:11:28 +01:00
|
|
|
#image: thecodingmachine/workadventure-pusher:${VERSION}
|
2021-02-02 11:19:24 +01:00
|
|
|
command: yarn run runprod
|
2021-01-08 00:20:27 +01:00
|
|
|
environment:
|
2022-02-09 14:11:28 +01:00
|
|
|
- SECRET_JITSI_KEY
|
|
|
|
- SECRET_KEY
|
|
|
|
- API_URL
|
|
|
|
- FRONT_URL=https://${FRONT_HOST}
|
|
|
|
- JITSI_URL
|
|
|
|
- JITSI_ISS
|
|
|
|
- DISABLE_ANONYMOUS
|
2021-01-08 00:20:27 +01:00
|
|
|
labels:
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.pusher.rule=Host(`${PUSHER_HOST}`)"
|
|
|
|
- "traefik.http.routers.pusher.entryPoints=web"
|
2021-01-08 00:20:27 +01:00
|
|
|
- "traefik.http.services.pusher.loadbalancer.server.port=8080"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.pusher-ssl.rule=Host(${PUSHER_HOST}`)"
|
2021-01-08 00:20:27 +01:00
|
|
|
- "traefik.http.routers.pusher-ssl.entryPoints=websecure"
|
|
|
|
- "traefik.http.routers.pusher-ssl.service=pusher"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.pusher-ssl.tls=true"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.routers.pusher-ssl.tls.certresolver=myresolver"
|
2022-02-09 14:11:28 +01:00
|
|
|
restart: ${RESTART_POLICY}
|
2021-02-02 11:19:24 +01:00
|
|
|
|
|
|
|
back:
|
2021-02-02 11:34:29 +01:00
|
|
|
build:
|
2021-02-03 12:29:41 +01:00
|
|
|
context: ../..
|
2021-02-02 11:34:29 +01:00
|
|
|
dockerfile: back/Dockerfile
|
2022-02-09 14:11:28 +01:00
|
|
|
#image: thecodingmachine/workadventure-back:${VERSION}
|
2021-02-02 11:19:24 +01:00
|
|
|
command: yarn run runprod
|
|
|
|
environment:
|
2022-02-09 14:11:28 +01:00
|
|
|
- SECRET_JITSI_KEY
|
|
|
|
- SECRET_KEY
|
|
|
|
- ADMIN_API_TOKEN
|
|
|
|
- ADMIN_API_URL
|
|
|
|
- TURN_SERVER
|
|
|
|
- TURN_USER
|
|
|
|
- TURN_PASSWORD
|
|
|
|
- TURN_STATIC_AUTH_SECRET
|
|
|
|
- STUN_SERVER
|
|
|
|
- JITSI_URL
|
|
|
|
- JITSI_ISS
|
|
|
|
- MAX_PER_GROUP
|
|
|
|
- STORE_VARIABLES_FOR_LOCAL_MAPS
|
2021-02-02 11:19:24 +01:00
|
|
|
labels:
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.back.rule=Host(`${BACK_HOST}`)"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.routers.back.entryPoints=web"
|
|
|
|
- "traefik.http.services.back.loadbalancer.server.port=8080"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.back-ssl.rule=Host(`${BACK_HOST}`)"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.routers.back-ssl.entryPoints=websecure"
|
|
|
|
- "traefik.http.routers.back-ssl.service=back"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.back-ssl.tls=true"
|
2021-02-02 11:19:24 +01:00
|
|
|
- "traefik.http.routers.back-ssl.tls.certresolver=myresolver"
|
2022-02-09 14:11:28 +01:00
|
|
|
restart: ${RESTART_POLICY}
|
|
|
|
|
|
|
|
maps:
|
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
Dockerfile: maps/Dockerfile
|
|
|
|
#image: thecodingmachine/workadventure-maps:${VERSION}
|
|
|
|
environment:
|
|
|
|
- DEBUG_MODE
|
|
|
|
- STARTUP_COMMAND_0=sudo a2enmod headers
|
|
|
|
- STARTUP_COMMAND_1=yarn install
|
|
|
|
- STARTUP_COMMAND_2=yarn run prod &
|
|
|
|
volumes:
|
|
|
|
- ${DATA_DIR}/maps:/var/www/html
|
|
|
|
labels:
|
|
|
|
- "traefik.http.routers.maps.rule=Host(`${MAPS_HOST}`)"
|
|
|
|
- "traefik.http.routers.maps.entryPoints=web"
|
|
|
|
- "traefik.http.services.maps.loadbalancer.server.port=80"
|
|
|
|
- "traefik.http.routers.maps-ssl.rule=Host(`${MAPS_HOST}`)"
|
|
|
|
- "traefik.http.routers.maps-ssl.entryPoints=websecure"
|
|
|
|
- "traefik.http.routers.maps-ssl.service=maps"
|
|
|
|
- "traefik.http.routers.maps-ssl.tls=true"
|
|
|
|
- "traefik.http.routers.maps-ssl.tls.certresolver=myresolver"
|
|
|
|
restart: ${RESTART_POLICY}
|
2021-11-10 18:22:03 +01:00
|
|
|
|
|
|
|
icon:
|
|
|
|
image: matthiasluedtke/iconserver:v3.13.0
|
|
|
|
labels:
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.icon.rule=Host(`${ICON_HOST}`)"
|
2021-11-10 18:22:03 +01:00
|
|
|
- "traefik.http.routers.icon.entryPoints=web,traefik"
|
|
|
|
- "traefik.http.services.icon.loadbalancer.server.port=8080"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.icon-ssl.rule=Host(`${ICON_HOST}`)"
|
2021-11-10 18:22:03 +01:00
|
|
|
- "traefik.http.routers.icon-ssl.entryPoints=websecure"
|
|
|
|
- "traefik.http.routers.icon-ssl.service=icon"
|
2022-02-09 14:11:28 +01:00
|
|
|
- "traefik.http.routers.icon-ssl.tls=true"
|
2021-11-10 18:22:03 +01:00
|
|
|
- "traefik.http.routers.icon-ssl.tls.certresolver=myresolver"
|