-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
57 lines (51 loc) · 1.2 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
version: '3.8'
services:
web:
build:
context: ./app
dockerfile: Dockerfile.prod
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
expose:
- 8000 # expose port 8000 to the outside world to be picked up with nginx. If not using nginx, you can use ports: - 8000:8000
env_file:
- ./.env.prod
redis:
image: redis:7.0.11-alpine
restart: always
celery_worker:
build:
context: ./app
dockerfile: Dockerfile.prod
command: /usr/src/app/celery_entrypoint.sh
volumes:
- ./app/:/usr/src/app/
env_file:
- ./.env.dev
depends_on:
- redis
celery_beat:
build:
context: ./app
dockerfile: Dockerfile.prod
command: /usr/src/app/celery_beat_entrypoint.sh
volumes:
- ./app/:/usr/src/app/
env_file:
- ./.env.dev
depends_on:
- redis
nginx:
build: ./nginx
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
ports:
- 1338:80
depends_on:
- web
volumes:
static_volume:
media_volume: