This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
84 lines (80 loc) · 1.72 KB
/
docker-compose.yml
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
version: '3.8'
services:
frontend:
build: ../barnomz-frontend
ports:
- target: 3000
published: 3000
mode: ingress
depends_on:
- backend
deploy:
replicas: 1
update_config:
order: start-first
delay: 10s
restart_policy:
condition: on-failure
resources:
limits:
cpus: '0.50'
memory: 500M
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:3000" ]
# interval: 30s
# timeout: 5s
# retries: 3
# start_period: 15s
backend:
build: .
command: python manage.py runserver 0.0.0.0:8000
ports:
- target: 8000
published: 8000
mode: ingress
depends_on:
- db
environment:
- DATABASE_HOST=db
- DATABASE_NAME=postgres
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres_password
deploy:
replicas: 1
update_config:
order: start-first
delay: 10s
restart_policy:
condition: on-failure
resources:
limits:
cpus: '0.50'
memory: 500M
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:8000/admin" ]
# interval: 30s
# timeout: 5s
# retries: 3
# start_period: 15s
db:
image: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres_password
volumes:
- postgres_data:/var/lib/postgresql/data
nginx:
image: nginx:alpine
ports:
- "443:443"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx/ssl:/etc/nginx/ssl
depends_on:
- frontend
- backend
volumes:
postgres_data: