forked from e-mission/e-mission-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (42 loc) · 1.22 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
version: "3"
services:
web-server:
build: .
depends_on:
- db
environment:
- DB_HOST=db
- WEB_SERVER_HOST=0.0.0.0
deploy:
replicas: 1
restart_policy:
condition: on-failure
ports:
#This is a default port mapping. In production you might want to use 80:8080,
- "8888:8888"
networks:
- emission
volumes:
- saved-notebooks:/usr/src/app/saved-notebooks
db:
image: mongo:3.4
deploy:
replicas: 1
restart_policy:
condition: on-failure
ports:
#This port binding allows you to access the database server outside the host machine. Remove this is you don't need this
#functionality
- "27017:27017"
#Volumes is the preferred way to persist data generated by a container. In this case we use a volume to persist the contents
#of the data base. Learn more about how to use volumes here: https://docs.docker.com/storage/volumes/
# And learn how to configure volumes in your compose file here: https://docs.docker.com/compose/compose-file/#volume-configuration-reference
volumes:
- mongo-data:/data/db
networks:
- emission
networks:
emission:
volumes:
mongo-data:
saved-notebooks: