forked from SotoAlt/monad-game-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (60 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
64 lines (60 loc) · 1.64 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
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: game_db
POSTGRES_USER: game
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
volumes:
- pgdata:/var/lib/postgresql/data
game:
build:
context: .
args:
VITE_PRIVY_APP_ID: ${VITE_PRIVY_APP_ID}
VITE_PRIVY_CLIENT_ID: ${VITE_PRIVY_CLIENT_ID}
VITE_TREASURY_ADDRESS: ${VITE_TREASURY_ADDRESS}
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- DATABASE_URL=postgresql://game:${DB_PASSWORD:-changeme}@db:5432/game_db
- JWT_SECRET=${JWT_SECRET}
- PRIVY_APP_ID=${PRIVY_APP_ID}
- PRIVY_APP_SECRET=${PRIVY_APP_SECRET}
- AI_PLAYERS=${AI_PLAYERS:-false}
- TREASURY_ADDRESS=${TREASURY_ADDRESS}
- MONAD_RPC_URL=${MONAD_RPC_URL:-https://rpc.monad.xyz}
volumes:
- gamedata:/app/data
depends_on:
- db
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- certbot-etc:/etc/letsencrypt:ro
- certbot-var:/var/lib/letsencrypt
- webroot:/var/www/certbot
depends_on:
- game
certbot:
image: certbot/certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- webroot:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do sleep 12h & wait $${!}; certbot renew --webroot -w /var/www/certbot; done'"
volumes:
pgdata:
gamedata:
certbot-etc:
certbot-var:
webroot: