-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
100 lines (96 loc) · 2.55 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
100 lines (96 loc) · 2.55 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
100
services:
frontend:
build:
context: .
dockerfile: docker/frontend.prod.Dockerfile
args:
NEXT_PUBLIC_SITE_URL: http://localhost:3000
NEXT_PUBLIC_HTTP_URL: http://backend:9000
NEXT_PUBLIC_SIGNALING_URL: ws://localhost:8000
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
signal:
condition: service_healthy
environment:
NEXT_PUBLIC_SITE_URL: http://localhost:3000
NEXT_PUBLIC_HTTP_URL: http://backend:9000
NEXT_PUBLIC_SIGNALING_URL: ws://localhost:8000
NODE_ENV: production
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:3000 || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
backend:
build:
context: .
dockerfile: docker/backend.prod.Dockerfile
args:
DATABASE_URL: ${DATABASE_URL}
ports:
- "9000:9000"
depends_on:
database:
condition: service_healthy
environment:
DATABASE_URL: ${DATABASE_URL}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
FRONTEND_URL: http://localhost:3000
NODE_ENV: production
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:9000/ || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 15s
signal:
build:
context: .
dockerfile: docker/signal.prod.Dockerfile
args:
DATABASE_URL: ${DATABASE_URL}
ports:
- "8000:8000"
- "8001:8001"
depends_on:
database:
condition: service_healthy
environment:
DATABASE_URL: ${DATABASE_URL}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
NODE_ENV: production
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8001/health || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
database:
image: postgres:16
restart: always
environment:
POSTGRES_USER: audora_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: audora
volumes:
- audora_postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U audora_user -d audora"]
interval: 5s
timeout: 5s
retries: 5
volumes:
audora_postgres_data: