-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yaml
50 lines (48 loc) · 1.13 KB
/
docker-compose.production.yaml
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
version: "3.9"
services:
db:
container_name: production-votebot-database
image: postgres:14.4-bullseye
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-u", "postgres"]
interval: 5s
timeout: 30s
retries: 5
start_period: 10s
volumes:
- production-votebot-database:/var/lib/postgresql/data
networks:
- production-votebot-network
app:
container_name: production-votebot-app
image: production-votebot-app:${COMMIT_ID:-latest}
build:
target: production
depends_on:
db:
condition: service_healthy
networks:
- production-votebot-network
nginx:
container_name: production-votebot-nginx
image: production-votebot-nginx:${COMMIT_ID:-latest}
build:
context: .
dockerfile: nginx/Dockerfile
volumes:
- ./static:/var/www/static
ports:
- "9000:80"
depends_on:
- app
networks:
- production-votebot-network
volumes:
production-votebot-database:
networks:
production-votebot-network: