diff --git a/contrib/docker/docker-compose.yaml b/contrib/docker/docker-compose.yaml new file mode 100644 index 00000000..b8517f70 --- /dev/null +++ b/contrib/docker/docker-compose.yaml @@ -0,0 +1,89 @@ +version: "3.3" +services: + reverse-proxy: + image: traefik:v2.3 + command: + - --log.level=WARN + - --providers.docker + - --entryPoints.web.address=:80 + ports: + - "127.0.0.1:8000:80" + depends_on: + - pusher + - front + volumes: + - /var/run/docker.sock:/var/run/docker.sock + restart: unless-stopped + + + front: + build: + context: ../.. + dockerfile: front/Dockerfile + #image: thecodingmachine/workadventure-front:master + environment: + DEBUG_MODE: "$DEBUG_MODE" + JITSI_URL: $JITSI_URL + JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE" + PUSHER_URL: https://pusher.${DOMAIN} + ICON_URL: https://icon.${DOMAIN} + API_URL: pusher.${DOMAIN} + STUN_SERVER: "${STUN_SERVER}" + TURN_SERVER: "${TURN_SERVER}" + TURN_USER: "${TURN_USER}" + TURN_PASSWORD: "${TURN_PASSWORD}" + START_ROOM_URL: "${START_ROOM_URL}" + labels: + - "traefik.http.routers.front.rule=Host(`play.${DOMAIN}`)" + - "traefik.http.routers.front.entryPoints=web" + - "traefik.http.routers.front.service=front" + - "traefik.http.services.front.loadbalancer.server.port=80" + restart: unless-stopped + + pusher: + build: + context: ../.. + dockerfile: pusher/Dockerfile + #image: thecodingmachine/workadventure-pusher:master + command: yarn run runprod + environment: + SECRET_JITSI_KEY: "$SECRET_JITSI_KEY" + SECRET_KEY: yourSecretKey + API_URL: back:50051 + JITSI_URL: $JITSI_URL + JITSI_ISS: $JITSI_ISS + FRONT_URL: https://play.${DOMAIN} + labels: + - "traefik.http.routers.pusher.rule=Host(`pusher.${DOMAIN}`)" + - "traefik.http.routers.pusher.entryPoints=web" + - "traefik.http.routers.pusher.service=pusher" + - "traefik.http.services.pusher.loadbalancer.server.port=8080" + restart: unless-stopped + + back: + build: + context: ../.. + dockerfile: back/Dockerfile + #image: thecodingmachine/workadventure-back:master + command: yarn run runprod + environment: + SECRET_JITSI_KEY: "$SECRET_JITSI_KEY" + ADMIN_API_TOKEN: "$ADMIN_API_TOKEN" + ADMIN_API_URL: "$ADMIN_API_URL" + JITSI_URL: $JITSI_URL + JITSI_ISS: $JITSI_ISS + TURN_STATIC_AUTH_SECRET: "$TURN_STATIC_AUTH_SECRET" + labels: + - "traefik.http.routers.back.rule=Host(`api.${DOMAIN}`)" + - "traefik.http.routers.back.entryPoints=web" + - "traefik.http.routers.back.service=back" + - "traefik.http.services.back.loadbalancer.server.port=8080" + restart: unless-stopped + + icon: + image: matthiasluedtke/iconserver:v3.13.0 + labels: + - "traefik.http.routers.icon.rule=Host(`icon.${DOMAIN}`)" + - "traefik.http.routers.icon.entryPoints=web" + - "traefik.http.routers.icon.service=icon" + - "traefik.http.services.icon.loadbalancer.server.port=8080"