-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (54 loc) · 991 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
55
56
57
58
services:
db:
image: mariadb:11
volumes:
- database:/var/lib/mysql:rw
networks:
- database
environment:
- MARIADB_DATABASE=${DB_NAME}
- MARIADB_USER=${DB_USER}
- MARIADB_PASSWORD=${DB_PASSWORD}
- MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
app:
build:
context: .
dockerfile: docker/django/Dockerfile
volumes:
- static:/app/static:rw
- media:/app/media:rw
networks:
- database
- nginx
environment:
- DB_HOST=db
- DB_NAME
- DB_USER
- DB_PASSWORD
- SECRET_KEY
- SITE_URL
- DEBUG
depends_on:
- db
nginx:
build:
context: docker/nginx
dockerfile: Dockerfile
ports:
- 8001:8001
volumes:
- static:/app/static:ro
- media:/app/media:ro
networks:
- nginx
depends_on:
- app
networks:
database:
driver: bridge
nginx:
driver: bridge
volumes:
database:
static:
media: