generated from matacoder/django-docker
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose-prod.yaml
53 lines (49 loc) · 982 Bytes
/
docker-compose-prod.yaml
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
version: '3.9'
volumes:
postgres_data:
static:
media:
nginx_conf:
cache:
driver: local
services:
db:
image: postgres:12.4
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
django:
image: matakov/wb:latest
depends_on:
- db
restart: always
env_file:
- ./.env
volumes:
- static:/code/static
- media:/code/media
- nginx_conf:/code/nginx/
entrypoint: /code/entrypoint.sh
environment:
- DEBUG=0
nginx:
image: nginx:1.19.0-alpine
ports:
- "127.0.0.1:1112:80"
volumes:
- static:/code/static
- media:/code/media
- nginx_conf:/etc/nginx/conf.d/
depends_on:
- django
restart: always
cache:
image: redis:6.2-alpine
restart: always
command: redis-server --save 600 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- cache:/data
env_file:
- ./.env