Files
GMW/infra/docker/docker-compose.yml
T
asepharyana 0668862db5 fix: use bind mounts for hot-deploy so changes survive container restart
deploy.sh now writes to host directories bind-mounted into containers
instead of docker exec tar-pipes (volatile). Added bind mounts to
docker-compose.yml for all 3 services (frontend, backend, gateway).

Memory: hotpatch-volatile-container.md
2026-07-05 07:05:01 +07:00

92 lines
2.6 KiB
YAML

version: '3.8'
services:
# Nginx Reverse Proxy + Frontend Static Files
# Routes /api and /ws to backend, serves frontend WASM directly
proxy:
image: registry.gitlab.com/mytheclipse-group/gmw/bete-proxy:${IMAGE_TAG:-latest}
container_name: imphenbot-proxy
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.imphenbot.rule=Host(`imphnen.asepharyana.my.id`)"
- "traefik.http.routers.imphenbot.entrypoints=websecure"
- "traefik.http.routers.imphenbot.tls=true"
- "traefik.http.services.imphenbot.loadbalancer.server.port=80"
depends_on:
- backend
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/"]
interval: 30s
timeout: 5s
retries: 3
volumes:
# Bind mount for hot-deploy frontend — deploy.sh writes here,
# survives container restart. The image default serves as fallback.
- ./frontend-dist:/usr/share/nginx/html
deploy:
resources:
limits:
memory: 64M
networks:
- app-shared-net
# Backend Service (REST API + WebSocket)
backend:
image: registry.gitlab.com/mytheclipse-group/gmw/bete-backend:${IMAGE_TAG:-latest}
container_name: imphenbot-backend
restart: unless-stopped
env_file:
- .env
environment:
NODE_ENV: production
WEBSERVER_PORT: 3000
volumes:
# Bind mount for hot-deploy backend JS — deploy.sh writes here,
# survives container restart.
- ./backend-dist:/app/services/backend/dist
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
start_period: 15s
retries: 3
deploy:
resources:
limits:
memory: 256M
networks:
- app-shared-net
# Discord Gateway Service (Event capture and processing — no HTTP)
discord-gateway:
image: registry.gitlab.com/mytheclipse-group/gmw/bete-discord-gateway:${IMAGE_TAG:-latest}
container_name: imphenbot-discord-gateway
restart: unless-stopped
env_file:
- .env
environment:
NODE_ENV: production
volumes:
- ./recordings:/app/recordings
# Bind mount for hot-deploy gateway JS — deploy.sh writes here,
# survives container restart.
- ./gateway-dist:/app/services/discord-gateway/dist
healthcheck:
test: ["CMD-SHELL", "kill -0 1 || exit 1"]
interval: 30s
timeout: 5s
start_period: 30s
retries: 3
deploy:
resources:
limits:
memory: 512M
networks:
- app-shared-net
networks:
app-shared-net:
name: app-shared-net
external: true