-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-prod.yml
63 lines (58 loc) · 1.18 KB
/
docker-compose-prod.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
version: "3.7"
services:
nginx:
build: ./nginx-proxy
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/media
ports:
- 81:80
depends_on:
- web
restart: on-failure:5
web:
build:
context: ./web-project
dockerfile: Dockerfile.prod
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/media
expose:
- 8000
env_file:
- .env.prod
depends_on:
- db
db:
build:
context: ./postgres-db
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env.prod
worker:
build:
context: ./web-project
dockerfile: Dockerfile.worker
command: celery worker --app=django_project --loglevel=info --logfile=celery.log
env_file:
- .env.prod
depends_on:
- web
- redis
worker-celery-beat:
build:
context: ./web-project
dockerfile: Dockerfile.worker
command: celery worker --app=django_project -B --loglevel=info --logfile=celery.log
env_file:
- .env.prod
depends_on:
- web
- redis
redis:
build: ./redis
volumes:
postgres_data:
static_volume:
media_volume: