forked from talamas/cs373-idb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
49 lines (43 loc) · 1.19 KB
/
docker-compose-prod.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
version: "2"
# A Docker Compose file for configuration of the production environment
services:
lb:
extends:
file: docker-compose-common.yml
service: lb
image: cs373sweg/db_test_lb
# environment:
# # Always deploy to n1 so the lb always has the same IP address. This is
# # just for convenience and isn't strictly necessary.
# - "constraint:node==*n1"
app:
extends:
file: docker-compose-common.yml
service: app
image: cs373sweg/db_test_app
expose:
# Expose port 8000 so it's only visibile on the container, not the host
- "8000"
env_file: idb-mysql.env
command: gunicorn app:app --bind 0.0.0.0:8000
# Run Gunicorn to serve app requests
db:
extends:
file: docker-compose-common.yml
service: db
image: cs373sweg/db_test_db
expose:
# Expose port 3306 so it's only visibile on the container, not the host
- "3306"
env_file:
- idb-mysql.env
- idb-mysql-root.env
volumes_from:
# Mount the volumes from the data container to store our MySQL files
- data
data:
extends:
file: docker-compose-common.yml
service: data
networks:
backend: {}