-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.17 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.17 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
94
95
96
97
98
99
version: '3.9'
services:
postgres:
image: postgres:16-alpine
container_name: raidbot-postgres
restart: unless-stopped
environment:
POSTGRES_USER: raidbot
POSTGRES_PASSWORD: raidbot_password
POSTGRES_DB: raidbot
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U raidbot"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: raidbot-redis
restart: unless-stopped
volumes:
- redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
bot:
build:
context: .
dockerfile: Dockerfile
target: runtime
container_name: raidbot-bot
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
DATABASE_URL: postgresql://raidbot:raidbot_password@postgres:5432/raidbot
REDIS_URL: redis://redis:6379
PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING: "1"
START_WEB: "false"
env_file:
- .env
volumes:
- ./logs:/app/logs
healthcheck:
test: ["CMD", "/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
web:
build:
context: .
dockerfile: Dockerfile
target: runtime
container_name: raidbot-web
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
NODE_ENV: production
DATABASE_URL: postgresql://raidbot:raidbot_password@postgres:5432/raidbot
REDIS_URL: redis://redis:6379
START_WEB: "true"
START_BOT: "false"
PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING: "1"
env_file:
- .env
ports:
- "3000:3000"
profiles:
- with-web
healthcheck:
test: ["CMD", "/healthcheck.sh"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postgres-data:
redis-data: