-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 1.82 KB
/
docker-compose.yml
File metadata and controls
76 lines (72 loc) · 1.82 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
services:
db:
image: postgres:15
restart: always
container_name: uni-feedback-db
environment:
POSTGRES_DB: uni-feedback
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${PGPASSWORD}
ports:
- "5433:5432"
networks:
- uni_feedback_network
volumes:
- uni_feedback_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
api:
image: uni-feedback-api:latest
container_name: uni-feedback-api
build:
context: .
dockerfile: apps/api/Dockerfile
ports:
- "3001:3001"
networks:
- uni_feedback_network
env_file:
- apps/api/.env.prod
depends_on:
db:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "http.get('http://localhost:3001/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
website-ssr:
image: uni-feedback-website-ssr:latest
container_name: uni-feedback-website-ssr
build:
context: .
dockerfile: apps/website-ssr/Dockerfile
ports:
- "3000:3000"
networks:
- uni_feedback_network
env_file:
- apps/website-ssr/.env.prod
depends_on:
db:
condition: service_healthy
api:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "http.get('http://localhost:3000', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
uni_feedback_postgres_data:
networks:
uni_feedback_network:
name: uni-feedback-network