-
Notifications
You must be signed in to change notification settings - Fork 46
/
docker-compose.prod.yml
58 lines (53 loc) · 1.02 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
version: "3.9"
services:
web:
build: .
restart: always
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000
env_file:
- ./.env
expose:
- 8000
volumes:
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
depends_on:
- redis
- db
db:
image: postgres:13
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
redis:
image: redis:7
celery:
build: .
restart: always
command: celery -A config worker -l info
volumes:
- .:/code
env_file:
- ./.env
depends_on:
- db
- redis
- web
nginx:
build: ./nginx
restart: always
ports:
- ${NGINX_PORT}:80
volumes:
- static_volume:/code/staticfiles
- media_volume:/code/mediafiles
depends_on:
- web
volumes:
postgres_data:
static_volume:
media_volume: