-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
92 lines (84 loc) · 2.61 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#docker-compose version
version: '2.4'
services:
web: #defines the main flask application enclosure
container_name: sms-flask
build:
context: ./
dockerfile: ./WEB/Dockerfile
ports:
#restricts to localhost, remove the ip prefix to allow public access
- 5000:5000
depends_on:
- mongo
- manage
environment:
MONGO_HOST: mongo
MONGO_PORT: 27017
#Should only be used for debugging.
# FLASK_DEBUG: 1
PYTHONUNBUFFERED: 1
#End of debugging config
#Mounts the app image to the source, to allow dynamic updates of the flask app.
#Should only be used for debugging.
#volumes:
# - ./WEB:/usr/src/app/WEB
# - ./SHARED:/usr/src/app/SHARED
#End of debugging config
twitter: #defines the main flask application enclosure
container_name: sms-twitter
build:
context: ./
dockerfile: ./TWITTER/Dockerfile
ports:
#restricts to localhost, remove the ip prefix to allow public access
- 5001:5001
depends_on:
- mongo
- manage
environment:
MONGO_HOST: mongo
MONGO_PORT: 27017
#Should only be used for debugging.
# FLASK_DEBUG: 1
PYTHONUNBUFFERED: 1
#End of debugging config
TWITTER_API_KEY: ${TWITTER_API_KEY}
TWITTER_API_ACCESS_KEY: ${TWITTER_API_ACCESS_KEY}
#Mounts the app image to the source, to allow dynamic updates of the flask app.
#Should only be used for debugging.
#volumes:
# - ./TWITTER:/usr/src/app/TWITTER
# - ./SHARED:/usr/src/app/SHARED
#End of debugging config
manage: #defines a node enclosure for interacting with the mongo database
container_name: sms-mongodb-manager
build:
context: ./
dockerfile: ./MANAGE/Dockerfile
depends_on:
- mongo
environment:
MONGO_HOST: mongo
MONGO_PORT: 27017
#Mounts the migration folder of the image to the source, to allow for dynamic updates of the migration code.
#Should only be used for debugging.
# volumes:
# - ./MANAGE/migrations:/usr/src/app/migrations
#End of debugging config
#Causes this service to remain idle, allowing the user to use it as a proxy for pushing database updates
command: tail -F anything
mongo: #defines the mongoDB enclosure
image: mongo:4.0.5
container_name: sms-mongodb
restart: always
volumes:
#allows the database to persist when shutdown / across builds
- symptomsurvey_db_volume:/data/db
#- type: volume
# target: /data/db
# source: symptomsurvey_db_volume
ports:
- 27017:27017
volumes:
symptomsurvey_db_volume: