2026-06-01 21:44:29 +07:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
|
|
services:
|
2026-07-04 03:03:36 +07:00
|
|
|
# Nginx Reverse Proxy + Frontend Static Files
|
|
|
|
|
# Routes /api and /ws to backend, serves frontend WASM directly
|
2026-06-02 08:36:34 +07:00
|
|
|
proxy:
|
2026-07-05 03:43:13 +07:00
|
|
|
image: registry.gitlab.com/mytheclipse-group/gmw/bete-proxy:${IMAGE_TAG:-latest}
|
2026-06-02 09:41:38 +07:00
|
|
|
container_name: imphenbot-proxy
|
2026-06-02 08:36:34 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
|
labels:
|
|
|
|
|
- "traefik.enable=true"
|
2026-06-02 09:41:38 +07:00
|
|
|
- "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"
|
2026-06-02 08:36:34 +07:00
|
|
|
depends_on:
|
|
|
|
|
- backend
|
2026-06-08 17:51:29 +07:00
|
|
|
healthcheck:
|
2026-07-04 03:03:36 +07:00
|
|
|
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/"]
|
2026-06-08 17:51:29 +07:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
2026-07-05 07:05:01 +07:00
|
|
|
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
|
2026-06-08 17:51:29 +07:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 64M
|
2026-06-02 08:36:34 +07:00
|
|
|
networks:
|
|
|
|
|
- app-shared-net
|
|
|
|
|
|
|
|
|
|
# Backend Service (REST API + WebSocket)
|
2026-06-01 21:44:29 +07:00
|
|
|
backend:
|
2026-07-05 03:43:13 +07:00
|
|
|
image: registry.gitlab.com/mytheclipse-group/gmw/bete-backend:${IMAGE_TAG:-latest}
|
2026-06-02 09:41:38 +07:00
|
|
|
container_name: imphenbot-backend
|
2026-06-01 21:44:29 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
|
env_file:
|
2026-06-02 09:41:38 +07:00
|
|
|
- .env
|
2026-06-01 21:44:29 +07:00
|
|
|
environment:
|
|
|
|
|
NODE_ENV: production
|
2026-06-02 09:41:38 +07:00
|
|
|
WEBSERVER_PORT: 3000
|
2026-07-05 07:05:01 +07:00
|
|
|
volumes:
|
|
|
|
|
# Bind mount for hot-deploy backend JS — deploy.sh writes here,
|
|
|
|
|
# survives container restart.
|
|
|
|
|
- ./backend-dist:/app/services/backend/dist
|
2026-06-08 17:51:29 +07:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
start_period: 15s
|
|
|
|
|
retries: 3
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 256M
|
2026-06-01 21:44:29 +07:00
|
|
|
networks:
|
|
|
|
|
- app-shared-net
|
|
|
|
|
|
|
|
|
|
# Discord Gateway Service (Event capture and processing — no HTTP)
|
|
|
|
|
discord-gateway:
|
2026-07-05 03:43:13 +07:00
|
|
|
image: registry.gitlab.com/mytheclipse-group/gmw/bete-discord-gateway:${IMAGE_TAG:-latest}
|
2026-06-02 09:41:38 +07:00
|
|
|
container_name: imphenbot-discord-gateway
|
2026-06-01 21:44:29 +07:00
|
|
|
restart: unless-stopped
|
|
|
|
|
env_file:
|
2026-06-02 09:41:38 +07:00
|
|
|
- .env
|
2026-06-01 21:44:29 +07:00
|
|
|
environment:
|
|
|
|
|
NODE_ENV: production
|
|
|
|
|
volumes:
|
2026-06-02 09:41:38 +07:00
|
|
|
- ./recordings:/app/recordings
|
2026-07-05 07:05:01 +07:00
|
|
|
# Bind mount for hot-deploy gateway JS — deploy.sh writes here,
|
|
|
|
|
# survives container restart.
|
|
|
|
|
- ./gateway-dist:/app/services/discord-gateway/dist
|
2026-06-08 17:51:29 +07:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "kill -0 1 || exit 1"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
start_period: 30s
|
|
|
|
|
retries: 3
|
|
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
|
|
|
|
memory: 512M
|
2026-06-01 21:44:29 +07:00
|
|
|
networks:
|
|
|
|
|
- app-shared-net
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
app-shared-net:
|
|
|
|
|
name: app-shared-net
|
|
|
|
|
external: true
|