forked from 37dev/django-docker-ssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (59 loc) · 1.26 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version: "3"
volumes:
local-postgres-data:
local-postgres-data-backups:
static-volume:
media-volume:
certs-volume:
services:
nginx:
restart: unless-stopped
build:
context: .
dockerfile: compose/nginx/Dockerfile
container_name: nginx
env_file:
- .envs/nginx/dev.env
ports:
- 80:80
- 443:443
volumes:
- static-volume:/home/django/app/static
- media-volume:/home/django/app/media
- certs-volume:/etc/letsencrypt
depends_on:
- web
web:
restart: unless-stopped
build:
context: .
dockerfile: compose/django/Dockerfile
container_name: django
depends_on:
- db
volumes:
- static-volume:/home/django/app/static
- media-volume:/home/django/app/media
expose:
- 8000
links:
- redis
env_file:
- .envs/django/dev.env
db:
restart: unless-stopped
build:
context: .
dockerfile: compose/postgres/Dockerfile
container_name: postgres
env_file:
- .envs/postgres/dev.env
volumes:
- local-postgres-data:/var/lib/postgresql/data
- local-postgres-data-backups:/backups
redis:
restart: unless-stopped
image: redis:alpine
container_name: redis
ports:
- "6379:6379"