-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.prod.yml
82 lines (73 loc) · 1.62 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3'
services:
web:
container_name: web
build:
context: ./
dockerfile: Dockerfile.prod
command: gunicorn dnd_7th_4_backend.wsgi:application --bind 0.0.0.0:8000 --timeout=120
environment:
DJANGO_SETTINGS_MODULE: dnd_7th_4_backend.settings.prod
TZ: "Asia/Seoul"
env_file:
- .env
volumes:
- static:/home/app/web/static
- media:/home/app/web/media
expose:
- 8000
entrypoint:
- sh
- config/docker/entrypoint.prod.sh
nginx:
container_name: nginx
build: ./config/nginx
environment:
TZ: "Asia/Seoul"
volumes:
- static:/home/app/web/static
- media:/home/app/web/media
ports:
- "80:80"
depends_on:
- web
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.7-alpine
environment:
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
- TZ=Asia/Seoul
ports:
- "5672:5672" # Default Port
- "15672:15672" # For UI
expose:
- "15672"
celery_worker:
container_name: celery_worker
build:
context: ./
dockerfile: Dockerfile.prod
ports: []
environment:
TZ: "Asia/Seoul"
depends_on:
- web
- rabbitmq
command: sh -c "celery -A dnd_7th_4_backend worker --loglevel=info"
celery_beat:
container_name: celery_beat
build:
context: ./
dockerfile: Dockerfile.prod
ports: []
environment:
TZ: "Asia/Seoul"
depends_on:
- web
- rabbitmq
- celery_worker
command: sh -c "celery -A dnd_7th_4_backend beat --loglevel=info"
volumes:
static:
media: