-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (87 loc) · 2.72 KB
/
docker-compose.yml
File metadata and controls
94 lines (87 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: convitelist-backend
restart: unless-stopped
ports:
- "127.0.0.1:3002:3001" # Only localhost - system nginx will proxy
environment:
- NODE_ENV=production
- PORT=3001
- DATABASE_URL=file:/app/data/prod.db
- SLEEPING_SERVER_URL=http://host.docker.internal:5000
- JWT_SECRET=${JWT_SECRET}
- SESSION_SECRET=${SESSION_SECRET}
- CLIENT_URL=${CLIENT_URL:-http://localhost:3000}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
- MINECRAFT_RCON_HOST=${RCON_HOST}
- MINECRAFT_RCON_PORT=${RCON_PORT}
- MINECRAFT_RCON_PASSWORD=${RCON_PASSWORD}
- STATUS_API_URL=${STATUS_API_URL}
volumes:
- backend-data:/app/data
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- convitelist-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- REACT_APP_API_URL=${REACT_APP_API_URL:-http://localhost:3001}
- REACT_APP_STATUS_API_URL=${REACT_APP_STATUS_API_URL}
- REACT_APP_SERVER_STATUS_URL=${REACT_APP_SERVER_STATUS_URL}
- REACT_APP_SERVER_NAME=${REACT_APP_SERVER_NAME}
container_name: convitelist-frontend
restart: unless-stopped
ports:
- "127.0.0.1:3003:80" # Only localhost - system nginx will proxy
depends_on:
backend:
condition: service_healthy
networks:
- convitelist-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# nginx service removed - using system nginx instead
# System nginx (already running on ports 80/443) will proxy to these containers
# Configure routing in /etc/nginx/sites-available/server.arnold.host.conf
# nginx:
# image: nginx:alpine
# container_name: convitelist-nginx
# restart: unless-stopped
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# - ./nginx/ssl:/etc/nginx/ssl:ro
# depends_on:
# - frontend
# - backend
# networks:
# - convitelist-network
# healthcheck:
# test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
# interval: 30s
# timeout: 3s
# retries: 3
volumes:
backend-data:
driver: local
networks:
convitelist-network:
driver: bridge