-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.portals.yml
227 lines (211 loc) · 6.53 KB
/
docker-compose.portals.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
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
volumes:
coverage:
services:
redis:
image: redis:latest
dpc_web:
build:
context: .
dockerfile: dpc-web/Dockerfile
image: dpc-web:latest
volumes:
- "./dpc-web/certs:/dpc-web/certs"
- "./dpc-web/coverage:/dpc-web/coverage"
- ./tmp/letter_opener/web:/dpc-web/tmp/letter_opener
- "./dpc-web/Gemfile.lock:/dpc-web/Gemfile.lock"
- "./dpc-web/app:/dpc-web/app"
- "./dpc-web/spec:/dpc-web/spec"
environment:
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://db/dpc-website_development
- TEST_DATABASE_URL=postgresql://db/dpc-website_test
- API_METADATA_URL=http://api:3002/v1
- API_ADMIN_URL=http://api:9900
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- DB_USER=postgres
- DB_PASS=dpc-safe
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- DPC_CA_CERT=${DPC_CA_CERT}
- RUBY_YJIT_ENABLE=1
- DISABLE_JSON_LOGGER=true
ports:
- "3900:3500"
depends_on:
- db
- redis
- web_sidekiq
web_sidekiq:
volumes:
- ./tmp/letter_opener/web:/dpc-web/tmp/letter_opener
build:
context: .
dockerfile: dpc-web/Dockerfile
command: sidekiq
image: dpc-web:latest
environment:
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://db/dpc-website_development
- TEST_DATABASE_URL=postgresql://db/dpc-website_test
- API_METADATA_URL=http://api:3002/v1
- API_ADMIN_URL=http://api:9900
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- DB_USER=postgres
- DB_PASS=dpc-safe
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- DPC_CA_CERT=${DPC_CA_CERT}
- RUBY_YJIT_ENABLE=1
- DISABLE_JSON_LOGGER=true
depends_on:
- redis
- db
dpc_admin:
build:
context: .
dockerfile: dpc-admin/Dockerfile
image: dpc-web-admin:latest
volumes:
- "./dpc-admin/coverage:/dpc-admin/coverage"
- ./tmp/letter_opener/admin:/dpc-admin/tmp/letter_opener
- "./dpc-admin/Gemfile.lock:/dpc-admin/Gemfile.lock"
environment:
- REDIS_URL=redis://redis
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- API_METADATA_URL=http://api:3002/v1
- API_ADMIN_URL=http://api:9900
- DATABASE_URL=postgresql://db/dpc-website_development
- TEST_DATABASE_URL=postgresql://db/dpc-website_test
- DB_USER=postgres
- DB_PASS=dpc-safe
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- RUBY_YJIT_ENABLE=1
- DISABLE_JSON_LOGGER=true
ports:
- "3000:3000"
depends_on:
- db
- redis
- admin_sidekiq
admin_sidekiq:
volumes:
- ./tmp/letter_opener/admin:/dpc-admin/tmp/letter_opener
build:
context: .
dockerfile: dpc-admin/Dockerfile
command: sidekiq
image: dpc-web-admin:latest
environment:
- REDIS_URL=redis://redis
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- API_METADATA_URL=http://api:3002/v1
- API_ADMIN_URL=http://api:9900
- DATABASE_URL=postgresql://db/dpc-website_development
- TEST_DATABASE_URL=postgresql://db/dpc-website_test
- DB_USER=postgres
- DB_PASS=dpc-safe
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- RUBY_YJIT_ENABLE=1
- DISABLE_JSON_LOGGER=true
depends_on:
- redis
- db
dpc_portal:
build:
context: .
dockerfile: dpc-portal/Dockerfile
image: dpc-web-portal:latest
volumes:
# Mount specific directories to avoid overwriting
# precompiled assets (public/assets/) and node_modules
- "./dpc-portal/app:/dpc-portal/app"
- "./dpc-portal/db:/dpc-portal/db"
- "./dpc-portal/lib:/dpc-portal/lib"
- "./dpc-portal/log:/dpc-portal/log"
- "./dpc-portal/bin:/dpc-portal/bin"
- "./dpc-portal/config:/dpc-portal/config"
- "./dpc-portal/config.ru:/dpc-portal/config.ru"
- "./dpc-portal/spec:/dpc-portal/spec"
# Mount dependency files
- "./dpc-portal/package.json:/dpc-portal/package.json"
- "./dpc-portal/package-lock.json:/dpc-portal/package-lock.json"
- "./dpc-portal/Gemfile:/dpc-portal/Gemfile"
- "./dpc-portal/Gemfile.lock:/dpc-portal/Gemfile.lock"
# Mount coverage and utility files
- "./dpc-portal/coverage:/dpc-portal/coverage"
- ./tmp:/dpc-portal/tmp
env_file:
- ./ops/config/decrypted/local.env
environment:
# Misc. non-application settings
- TERM=${TERM:-xterm-256color}
- 'PS1=${DOCKER_PS1:-[docker] \w: }'
- "LSCOLORS=${DOCKER_LSCOLORS:- }"
# Application settings
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://db/dpc-portal_development
- TEST_DATABASE_URL=postgresql://db/dpc-portal_test
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- API_METADATA_URL=http://api:3002/v1
- API_ADMIN_URL=http://api:9900
- DB_USER=postgres
- DB_PASS=dpc-safe
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- CPI_API_GW_BASE_URL=http://localhost:4567/
- CMS_IDM_OAUTH_URL=http://localhost:4567/
- IDP_HOST=idp.int.identitysandbox.gov
- RUBY_YJIT_ENABLE=1
- ENV=local
- NEW_RELIC_MONITOR_MODE=false
- DISABLE_JSON_LOGGER=true
ports:
- "3100:3100"
depends_on:
- db
- portal_sidekiq
portal_sidekiq:
volumes:
- ./tmp/letter_opener/portal:/dpc-portal/tmp/letter_opener
- "./dpc-portal/app:/dpc-portal/app"
build:
context: .
dockerfile: dpc-portal/Dockerfile
command: sidekiq
image: dpc-web-portal:latest
environment:
- REDIS_URL=redis://redis
- DATABASE_URL=postgresql://db/dpc-portal_development
- DB_USER=postgres
- DB_PASS=dpc-safe
- GOLDEN_MACAROON=${GOLDEN_MACAROON}
- API_ADMIN_URL=http://api:9900
- API_METADATA_URL=http://api:3002/v1
- CPI_API_GW_BASE_URL=http://localhost:4567/
- CMS_IDM_OAUTH_URL=http://localhost:4567/
- IDP_HOST=idp.int.identitysandbox.gov
- RUBY_YJIT_ENABLE=1
- ENV=local
- DISABLE_JSON_LOGGER=true
depends_on:
- redis
- db
# Starts up each service in the background
start_core_dependencies:
image: dadarek/wait-for-dependencies
depends_on:
- db
- redis
command: db:5432
start_web:
image: dadarek/wait-for-dependencies
depends_on:
- dpc_web
command: dpc_web:3500
start_admin:
image: dadarek/wait-for-dependencies
depends_on:
- dpc_admin
command: dpc_admin:3000
start_portal:
image: dadarek/wait-for-dependencies
depends_on:
- dpc_portal
command: dpc_portal:3100