-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (30 loc) · 1002 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (30 loc) · 1002 Bytes
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
version: '3'
services:
djangoapp:
build: .
volumes:
- .:/TwitterAnalysis
- static_volume:/TwitterAnalysis/static # <-- bind the static volume
# - media_volume:/TwitterAnalysis/media # <-- bind the media volume
networks: # <-- here
- nginx_network
# ports: No need for port
# - 8000:8000 Since we'll be using nginx to manage requests
nginx:
image: nginx:1.13
ports:
- 8000:80
volumes:
- ./TwitterAnalysis/config/nginx/conf.d:/etc/nginx/conf.d
- static_volume:/TwitterAnalysis/static # <-- bind the static volume
# - media_volume:/TwitterAnalysis/media # <-- bind the media volume
depends_on: # <-- wait for djangoapp to be "ready" before starting this service
- djangoapp
networks: # <-- here
- nginx_network
networks: # <-- and here
nginx_network:
driver: bridge
volumes:
static_volume: # <-- declare the static volume
# media_volume: # <-- declare the media volume