Files
ActionBlock/docker-compose.yml
T
2026-10-23 19:38:36 +02:00

41 lines
1.4 KiB
YAML

# Both networks must already exist and be attached to the reverse proxy:
# docker network create actionBlocks_website
# docker network create actionBlocks_server
#
# Reverse proxy routing:
# website -> actionblocks-website:80
# game hub -> actionblocks-server:8080, path /hub (needs WebSocket upgrade support:
# "Upgrade" and "Connection" headers must be forwarded).
# Sub-paths are supported (e.g. site at https://example.com/website/, server at /server):
# - the website works whether or not the proxy strips its prefix;
# - set SERVER_URL to the hub URL the browser should use, e.g. https://example.com/server/hub;
# - if the proxy does NOT strip the server prefix, set PATH_BASE=/server.
# If the hub is served from a different host, also list the website origin in ALLOWED_ORIGINS.
services:
actionblocks-website:
build: ./actionBlocks_website
container_name: actionblocks-website
restart: unless-stopped
environment:
SERVER_URL: ${SERVER_URL:-}
networks:
- actionBlocks_website
actionblocks-server:
build: ./actionBlocks_server
container_name: actionblocks-server
restart: unless-stopped
environment:
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-}
HUB_PATH: /hub
PATH_BASE: ${PATH_BASE:-}
networks:
- actionBlocks_server
networks:
actionBlocks_website:
external: true
actionBlocks_server:
external: true