-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (49 loc) · 903 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
49
50
51
52
53
54
version: "3"
services:
db:
container_name: blog_db
image: postgres:12.3
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data
env_file: ./.env.docker
networks:
- blog_net
web:
container_name: blog_django
build: .
restart: always
command: gunicorn dockerDjango.wsgi:application --bind 0.0.0.0:8000
expose:
- 8000
volumes:
- media_data:/app/media
- static_data:/app/static
env_file:
- .env
depends_on:
- db
links:
- db:db
networks:
- blog_net
nginx:
container_name: blog_nginx
build: ./nginx
restart: always
ports:
- 8086:80
depends_on:
- web
volumes:
- media_data:/media
- static_data:/static
networks:
- blog_net
volumes:
media_data:
static_data:
postgres_data:
networks:
blog_net:
driver: bridge