forked from rl-institut/cp_nigeria_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (70 loc) · 1.43 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
version: "3.7"
services:
db:
image: postgres:17-alpine3.19
container_name: optimg_db
restart: always
env_file:
- .envs/db.postgres
expose:
- 5432
volumes:
- db_data:/var/lib/postgresql/data/
networks:
- optimg_network
app:
build:
context: ./app
dockerfile: ./compose/production/app_postgres/Dockerfile
container_name: django-optimg
restart: always
env_file:
- .envs/epa.postgres
expose:
- 8000
volumes:
- static_volume:/src/cdn_static_root
command: "gunicorn --workers=2 --bind=0.0.0.0:8000 epa.wsgi:application"
links:
- db
depends_on:
- db
networks:
- optimg_network
djangoq:
build:
context: ./app
dockerfile: ./compose/production/app_postgres/Dockerfile
container_name: django-q-optimg
restart: always
env_file:
- .envs/epa.postgres
command: python manage.py qcluster
volumes:
- static_volume:/src/cdn_static_root
- .:/code
expose:
- 8000
depends_on:
- db
- app
networks:
- optimg_network
nginx:
image: nginx:1.27-alpine
container_name: optimg_ngx
restart: always
ports:
- "8080:80"
volumes:
- ./nginx/postgres:/etc/nginx/conf.d
- static_volume:/static
depends_on:
- app
networks:
- optimg_network
volumes:
db_data:
static_volume:
networks:
optimg_network: