-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
69 lines (59 loc) · 1.23 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
65
66
67
68
69
version: '3'
networks:
web_network: {}
database_network: {}
volumes:
data: {}
static: {}
media: {}
services:
# reverse proxy container (nginx)
nginx:
image: nginx:1.13
ports:
- 8000:80
volumes:
- ./config/nginx/conf.d:/etc/nginx/conf.d
- static:/opt/services/djangoapp/static
- media:/opt/services/djangoapp/media
networks:
- web_network
depends_on:
- djangoapp
- shinyapp
# web container, with django + gunicorn
djangoapp:
build:
context: .
dockerfile: Dockerfile.django
environment:
- DJANGO_SETTINGS_MODULE
env_file:
- config/db/db.env
volumes:
- .:/opt/services/djangoapp/src
- static:/opt/services/djangoapp/static
- media:/opt/services/djangoapp/media
networks:
- database_network
- web_network
depends_on:
- database
- shinyapp
shinyapp:
build:
context: .
dockerfile: Dockerfile.shiny
volumes:
- .:/opt/services/shinyapp/src
networks:
- web_network
# database container
database:
image: postgres:10
volumes:
- data:/var/lib/postgresql/data
env_file:
- config/db/db.env
networks:
- database_network