-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.staging.yml
More file actions
96 lines (90 loc) · 2.66 KB
/
docker-compose.staging.yml
File metadata and controls
96 lines (90 loc) · 2.66 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
# Staging Docker Compose Configuration
# Deploy with: ./ops/deploy/deploy-staging.sh
# Images are built in GitHub Actions and pulled from GHCR
# Uses PGPASSWORD_STAGING environment variable for database password
services:
db-staging:
image: postgres:15
restart: always
container_name: uni-feedback-db-staging
environment:
POSTGRES_DB: uni-feedback-staging
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${PGPASSWORD_STAGING}
ports:
- "5434:5432"
networks:
- uni_feedback_staging_network
volumes:
- uni_feedback_staging_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
api-staging:
image: ghcr.io/afonsocrg/uni-feedback-api:staging-latest
container_name: uni-feedback-api-staging
ports:
- "3011:3001"
networks:
- uni_feedback_staging_network
env_file:
- apps/api/.env.staging
depends_on:
db-staging:
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-staging:
image: ghcr.io/afonsocrg/uni-feedback-website-ssr:staging-latest
container_name: uni-feedback-website-ssr-staging
ports:
- "3010:3000"
networks:
- uni_feedback_staging_network
env_file:
- apps/website-ssr/.env.staging
depends_on:
db-staging:
condition: service_healthy
api-staging:
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
dashboard-staging:
image: ghcr.io/afonsocrg/uni-feedback-dashboard:staging-latest
container_name: uni-feedback-dashboard-staging
ports:
- "3012:80"
networks:
- uni_feedback_staging_network
depends_on:
api-staging:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
uni_feedback_staging_postgres_data:
name: uni-feedback_uni_feedback_staging_postgres_data
external: true
networks:
uni_feedback_staging_network:
name: uni-feedback-staging-network
external: true