-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
51 lines (50 loc) · 1.35 KB
/
Copy pathcompose.yml
File metadata and controls
51 lines (50 loc) · 1.35 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
name: Job-ch
services:
nginx:
image: nginx
container_name: Nginx-Job
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
ports:
- 8001:80
volumes:
- ./index.html:/usr/share/nginx/html/index.html:ro
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- Web-Net
api:
build: ./api
container_name: Flask-API-Job
restart: unless-stopped
networks:
- Web-Net
- Back-Net
db:
image: postgres:16
container_name: PSQL-Job
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
environment:
POSTGRES_DB: ${JOB_POSTGRES_DB}
POSTGRES_USER: ${JOB_POSTGRES_USER}
POSTGRES_PASSWORD: ${JOB_POSTGRES_PASSWORD}
volumes:
- PSQL:/var/lib/postgresql/data
networks:
- Back-Net
volumes:
PSQL:
name: PSQL
networks:
Web-Net:
Back-Net: