generated from matacoder/django-docker
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
48 lines (44 loc) · 865 Bytes
/
docker-compose.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
version: '3.9'
volumes:
postgres_data:
cache:
driver: local
services:
db:
image: postgres:12.4
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env
django:
build: .
depends_on:
- db
restart: always
env_file:
- ./.env
volumes:
- .:/code/
entrypoint: /code/entrypoint.sh
environment:
- DEBUG=1
nginx:
image: nginx:1.19.0-alpine
ports:
- "127.0.0.1:1112:80"
volumes:
- ./static:/code/static
- ./media:/code/media
- ./nginx:/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