From d3df66b615c484a4f2fc9df8006b29798836cbf9 Mon Sep 17 00:00:00 2001 From: _Bastler <_Bastler@bstly.de> Date: Sun, 27 Feb 2022 14:39:06 +0100 Subject: [PATCH] merge develop_vite --- .gitignore | 1 - docker-compose.prod.yaml | 141 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 docker-compose.prod.yaml diff --git a/.gitignore b/.gitignore index 0098f157..b78ea999 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ .vscode Vagrantfile docker-compose.override.yaml -docker-compose.prod.yaml *.DS_Store maps/yarn.lock maps/dist/computer.js diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml new file mode 100644 index 00000000..2a1272e6 --- /dev/null +++ b/docker-compose.prod.yaml @@ -0,0 +1,141 @@ +version: "3.3" +services: + reverse-proxy: + image: traefik:v2.5.2 + command: + - --log.level=WARN + - --providers.docker + - --entryPoints.web.address=:80 + ports: + - "9999:80" + depends_on: + - pusher + - front + volumes: + - /var/run/docker.sock:/var/run/docker.sock + restart: ${RESTART_POLICY} + + front: + build: + context: ./ + dockerfile: front/Dockerfile + environment: + DEBUG_MODE: "$DEBUG_MODE" + START_ROOM_URL: "${START_ROOM_URL}" + PUSHER_URL: /pusher + ADMIN_URL: /admin + UPLOADER_URL: /uploader + ICON_URL: /icon + STUN_SERVER: "$STUN_SERVER" + TURN_SERVER: "${TURN_SERVER}" + SKIP_RENDER_OPTIMIZATIONS: "${SKIP_RENDER_OPTIMIZATIONS}" + DISABLE_NOTIFICATIONS: "${DISABLE_NOTIFICATIONS}" + TURN_USER: "${TURN_USER}" + TURN_PASSWORD: "${TURN_PASSWORD}" + JITSI_URL: $JITSI_URL + JITSI_PRIVATE_MODE: "$JITSI_PRIVATE_MODE" + MAX_USERNAME_LENGTH: "${MAX_USERNAME_LENGTH}" + MAX_PER_GROUP: "${MAX_PER_GROUP}" + DISPLAY_TERMS_OF_USE: "$DISPLAY_TERMS_OF_USE" + CONTACT_URL: "${PROFILE_URL}" + PROFILE_URL: "${PROFILE_URL}" + DISABLE_ANONYMOUS: "$DISABLE_ANONYMOUS" + OPID_LOGIN_SCREEN_PROVIDER: "$OPID_LOGIN_SCREEN_PROVIDER" + FALLBACK_LOCALE: "${FALLBACK_LOCALE}" + labels: + - "traefik.http.routers.front.rule=PathPrefix(`/`)" + - "traefik.http.routers.front.entryPoints=web" + - "traefik.http.services.front.loadbalancer.server.port=80" + - "traefik.http.routers.front.service=front" + restart: ${RESTART_POLICY} + + pusher: + build: + context: ./ + dockerfile: pusher/Dockerfile + environment: + SECRET_KEY: ${SECRET_KEY} + ALLOW_ARTILLERY: "$ALLOW_ARTILLERY" + API_URL: back:50051 + ADMIN_API_URL: "${ADMIN_API_URL}" + ADMIN_URL: "${ADMIN_URL}" + ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" + ADMIN_SOCKETS_TOKEN: "${ADMIN_SOCKETS_TOKEN}" + CPU_OVERHEAT_THRESHOLD: $CPU_OVERHEAT_THRESHOLD + JITSI_URL: ${JITSI_URL} + JITSI_ISS: ${JITSI_ISS} + SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" + PUSHER_HTTP_PORT: "$PUSHER_HTTP_PORT" + SOCKET_IDLE_TIMER: "$SOCKET_IDLE_TIMER" + PUSHER_FORCE_ROOM_UPDATE : $PUSHER_FORCE_ROOM_UPDATE + FRONT_URL : $FRONT_URL + OPID_CLIENT_ID: $OPID_CLIENT_ID + OPID_CLIENT_SECRET: $OPID_CLIENT_SECRET + OPID_CLIENT_ISSUER: $OPID_CLIENT_ISSUER + OPID_CLIENT_REDIRECT_URL: $OPID_CLIENT_REDIRECT_URL + OPID_PROFILE_SCREEN_PROVIDER: $OPID_PROFILE_SCREEN_PROVIDER + OPID_ADDITIONAL_SCOPES: $OPID_ADDITIONAL_SCOPES + OPID_USERNAME_CLAIM: $OPID_USERNAME_CLAIM + OPID_LOCALE_CLAIM: $OPID_LOCALE_CLAIM + DISABLE_ANONYMOUS: $DISABLE_ANONYMOUS + labels: + - "traefik.http.middlewares.strip-pusher-prefix.stripprefix.prefixes=/pusher" + - "traefik.http.routers.pusher.rule=PathPrefix(`/pusher`)" + - "traefik.http.routers.pusher.middlewares=strip-pusher-prefix@docker" + - "traefik.http.routers.pusher.entryPoints=web" + - "traefik.http.services.pusher.loadbalancer.server.port=8080" + - "traefik.http.routers.pusher.service=pusher" + restart: ${RESTART_POLICY} + + + back: + build: + context: ./ + dockerfile: back/Dockerfile + environment: + MINIMUM_DISTANCE: $MINIMUM_DISTANCE + GROUP_RADIUS: $GROUP_RADIUS + ALLOW_ARTILLERY: "$ALLOW_ARTILLERY" + ADMIN_API_URL: "${ADMIN_API_URL}" + ADMIN_API_TOKEN: "${ADMIN_API_TOKEN}" + CPU_OVERHEAT_THRESHOLD: $CPU_OVERHEAT_THRESHOLD + JITSI_URL: ${JITSI_URL} + JITSI_ISS: ${JITSI_ISS} + SECRET_JITSI_KEY: "${SECRET_JITSI_KEY}" + HTTP_PORT: "$HTTP_PORT" + GRPC_PORT: "$GRPC_PORT" + TURN_STATIC_AUTH_SECRET: "${TURN_STATIC_AUTH_SECRET}" + MAX_PER_GROUP: ${MAX_PER_GROUP} + REDIS_HOST: redis + REDIS_PORT: "$REDIS_PORT" + REDIS_PASSWORD: $REDIS_PASSWORD + STORE_VARIABLES_FOR_LOCAL_MAPS: "$STORE_VARIABLES_FOR_LOCAL_MAPS" + labels: + - "traefik.http.middlewares.strip-api-prefix.stripprefix.prefixes=/api" + - "traefik.http.routers.back.rule=PathPrefix(`/api`)" + - "traefik.http.routers.back.middlewares=strip-api-prefix@docker" + - "traefik.http.routers.back.entryPoints=web" + - "traefik.http.services.back.loadbalancer.server.port=8080" + - "traefik.http.routers.back.service=back" + restart: ${RESTART_POLICY} + + + redis: + image: redis:6 + restart: ${RESTART_POLICY} + + + icon: + image: matthiasluedtke/iconserver:v3.13.0 + environment: + DISABLE_BROWSE_PAGES: "true" + METRICS_PATH: "disable" + SERVER_MODE: "download" + labels: + - "traefik.http.middlewares.strip-icon-prefix.stripprefix.prefixes=/icon" + - "traefik.http.routers.icon.rule=PathPrefix(`/icon`)" + - "traefik.http.routers.icon.middlewares=strip-icon-prefix@docker" + - "traefik.http.routers.icon.entryPoints=web" + - "traefik.http.services.icon.loadbalancer.server.port=8080" + - "traefik.http.routers.icon.service=icon" + restart: ${RESTART_POLICY} \ No newline at end of file