Files
svelte-mud/docker-compose.yml
T

48 lines
1.2 KiB
YAML
Raw Normal View History

2025-04-21 14:12:36 +02:00
services:
2026-09-09 13:04:56 +02:00
svelte-mud-app:
2025-04-21 14:12:36 +02:00
build:
context: .
dockerfile: Dockerfile
2026-09-09 13:04:56 +02:00
image: svelte-mud:local
container_name: svelte-mud-app
command: ["node", "build/index.js"]
2025-04-21 14:12:36 +02:00
restart: unless-stopped
2025-04-21 22:42:26 +02:00
networks:
2025-04-21 22:49:26 +02:00
- revproxy
2025-04-21 14:12:36 +02:00
environment:
2026-09-09 13:04:56 +02:00
NODE_ENV: production
2025-04-21 23:43:50 +02:00
expose:
2026-09-09 13:04:56 +02:00
- "3000"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
svelte-mud-proxy:
image: svelte-mud:local
container_name: svelte-mud-proxy
command: ["node", "src/websocket-server.js"]
restart: unless-stopped
depends_on:
svelte-mud-app:
condition: service_started
networks:
- revproxy
environment:
NODE_ENV: production
ALLOWED_ORIGINS: https://mud.iamtalon.me
TRUST_PROXY: "1"
expose:
- "3001"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3001/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
2025-04-21 22:42:26 +02:00
# Define networks to connect to external services
networks:
2025-04-21 22:49:26 +02:00
revproxy:
2026-09-09 13:04:56 +02:00
external: true