-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
150 lines (142 loc) · 4.9 KB
/
docker-compose.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# 🧪 Docker Composition for the Clinical Data App of MCL
# ======================================================
#
# This is the Docker Composition for the Clinical Data App for the Consortium
# for Molecular and Cellular Characterization of Screen-Detected Lesions.
# Services
# --------
#
services:
# Database
# ~~~~~~~~
#
# Good old relational database!
db:
container_name: clinical-db
image: postgres:12.4
volumes:
-
type: bind
source: ${CLINICAL_DATA_DIR:-/usr/local/labcas/mcl/clinic/docker-data}/postgresql
target: /var/lib/postgresql/data
consistency: consistent
ports:
-
# Map container's PostgreSQL port to the traditional port, or whatever CLINICAL_DB_PORT is
target: 5432
published: ${CLINICAL_DB_PORT:-5432}
protocol: tcp
mode: host
networks:
- mainbus
- default
environment:
# Empty settings inherit values from the host's environment
CLINICAL_DATA_DIR:
CLINICAL_DB_PORT:
POSTGRES_PASSWORD:
restart: always
stop_grace_period: 29s
labels:
org.label-schema.name: MCL Clinical DB
org.label-schema.description: PostgreSQL database serving the MCL Clinical Data App.
# ReST API
# ~~~~~~~~
#
# A Python app using Pyramid providing a ReST API; version 1
api-v1:
container_name: clinical-api-v1
image: ${MCL_IMAGE_OWNER-nutjob4life/}mcl-infirmary:${CLINICAL_API_V1_VERSION:-1.0.0}
ports:
-
# Map container's Pyramid app on 8080 to a more traditional (for Pyramid) 6543
# or whatever CLINICAL_API_PORT is.
target: 8080
published: ${CLINICAL_API_PORT:-6543}
protocol: tcp
mode: host
networks:
- mainbus
- default
environment:
DATABASE: postgresql://mcl:mcl@db/clinical_data
LDAP_SERVER: ldaps://edrn-ds.jpl.nasa.gov
# Empty settings inherit values from the host's environment
CLINICAL_API_PORT:
CLINICAL_API_VERSION:
depends_on:
- db
restart: always
stop_grace_period: 13s
labels:
org.label-schema.name: MCL Clinical API v1
org.label-schema.description: Version 1 of the ReST API serving the MCL Clinical Data App.
api-v2:
container_name: clinical-api-v2
image: ${MCL_IMAGE_OWNER-nutjob4life/}mcl-infirmary:${CLINICAL_API_V2_VERSION:-1.0.2}
ports:
-
# Map container's Pyramid app on 8080 to 6544
target: 8080
published: ${CLINICAL_API_V2_PORT:-6544}
protocol: tcp
mode: host
networks:
- mainbus
- default
environment:
DATABASE: postgresql://mcl:mcl@db/clinical_data
LDAP_SERVER: ldaps://edrn-ds.jpl.nasa.gov
# Empty settings inherit values from the host's environment
CLINICAL_API_PORT:
CLINICAL_API_VERSION:
depends_on:
- db
restart: always
stop_grace_period: 13s
labels:
org.label-schema.name: MCL Clinical API v2
org.label-schema.description: Version 2 of the ReST API serving the MCL Clinical Data App.
api-v3:
container_name: clinical-api-v3
image: ${MCL_IMAGE_OWNER-nutjob4life/}mcl-infirmary:${CLINICAL_API_V3_VERSION:-latest}
ports:
-
# Map container's Pyramid app on 8080 to 6544
target: 8080
published: ${CLINICAL_API_V3_PORT:-6545}
protocol: tcp
mode: host
networks:
- mainbus
- default
environment:
DATABASE: postgresql://mcl:mcl@db/clinical_data_v3
LDAP_SERVER: ldaps://edrn-ds.jpl.nasa.gov
# Empty settings inherit values from the host's environment
CLINICAL_API_PORT:
CLINICAL_API_VERSION:
depends_on:
- db
restart: always
stop_grace_period: 13s
labels:
org.label-schema.name: MCL Clinical API v3
org.label-schema.description: Version 3 of the ReST API serving the MCL Clinical Data App.
# Networks
# --------
#
# Thankfully, this is pretty simple.
networks:
mainbus:
driver: bridge
labels:
org.label-schema.name: MCL Main Bus Network
org.label-schema.description: Internal bridge network so the services that comprise the MCL Clinical Data app may communicate.
default:
driver: bridge
# Misc
# ----
#
# Only thing we have here is some Docker Compose metadata.
version: '3.7'