-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
195 lines (177 loc) · 6.26 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
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
networks:
# Creates `vro_intranet` network if env variable COMPOSE_PROJECT_NAME=vro
intranet:
volumes:
# Volumes to simulate persistent volumes in LHDI deployment environments
# Creates `vro_tracking` volume name if env variable COMPOSE_PROJECT_NAME=vro
pgdata:
tracking:
# Create the following volumes so that they have recognizable names rather than UUIDs
var_pgdata:
var_rabbitmq:
# Reusable blocks
# https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd
# Also note https://yaml.org/type/merge.html
x-common-vars: &common-vars
# ENV determines which configuration settings to use.
ENV: ${ENV:-local}
DEBUG: ${DEBUG:-false}
x-rabbitmq-placeholder-vars: &rabbitmq-placeholder-vars
RABBITMQ_PLACEHOLDERS_HOST: rabbitmq-service
RABBITMQ_USERNAME: ${RABBITMQ_USERNAME}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
x-postgres-vars: &postgres-vars
POSTGRES_URL: postgresql://postgres-service:5432/vro
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_SCHEMA: claims
x-datadog-placeholder-vars: &datadog-placeholder-vars
DD_SITE: ${DD_SITE}
DD_API_KEY: ${DD_API_KEY}
DD_APP_KEY: ${DD_APP_KEY}
x-common-security-opt: &common-security-opt
security_opt:
- no-new-privileges:true
x-common-sde-security: &common-sde-security
ulimits:
nproc: 65535
x-image-platform: &image-platform
platform: ${VRO_DOCKER_IMAGE_PLATFORM}
# Don't start VRO microservices until VRO Platform services are up
x-svc-depends-on: &svc-depends-on
rabbitmq-service:
condition: service_healthy
postgres-service:
condition: service_healthy
services:
# Containers with the `svc-` prefix are microservices to support domain workflows.
# Containers with the `mock-` prefix are used for development and testing.
rabbitmq-service:
image: va/abd_vro-rabbitmq
<<: *image-platform
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 5s
timeout: 3s
retries: 30
volumes:
- var_rabbitmq:/var/lib/rabbitmq/mnesia
networks:
- intranet
profiles: [ "all", "platform", "kafka"]
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_USER: ${RABBITMQ_USERNAME}
RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
RABBITMQ_DISK_FREE_ABSOLUTE_LIMIT: "10GB"
RABBITMQ_MANAGEMENT_ALLOW_WEB_ACCESS: "true"
postgres-service:
image: va/abd_vro-postgres
healthcheck:
test: "pg_isready -U $$FLYWAY_USER -d $$FLYWAY_DB"
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: ${POSTGRES_SUPER_USER}
POSTGRES_PASSWORD: ${POSTGRES_SUPER_PASSWORD}
FLYWAY_USER: ${POSTGRES_FLYWAY_USER}
FLYWAY_PASSWORD: ${POSTGRES_FLYWAY_PASSWORD}
FLYWAY_DB: ${POSTGRES_DB}
PGDATA: /persist/postgres/pgdata
volumes:
- pgdata:/persist/postgres
- var_pgdata:/var/lib/postgresql/data
networks:
- intranet
profiles: [ "all", "platform" ]
ports:
- "5432:5432"
db-init:
image: va/abd_vro-db-init:latest
depends_on:
postgres-service:
condition: service_healthy
networks:
- intranet
profiles: [ "all", "platform"]
environment:
POSTGRES_URL: postgresql://postgres-service:5432/${POSTGRES_DB}
FLYWAY_USER: ${POSTGRES_FLYWAY_USER}
FLYWAY_PASSWORD: ${POSTGRES_FLYWAY_PASSWORD}
FLYWAY_SCHEMA: ${POSTGRES_SCHEMA}
FLYWAY_PLACEHOLDERS_USERNAME: ${POSTGRES_USER}
FLYWAY_PLACEHOLDERS_DB_NAME: ${POSTGRES_DB}
FLYWAY_PLACEHOLDERS_SCHEMA_NAME: ${POSTGRES_SCHEMA}
FLYWAY_PLACEHOLDERS_USER_PASSWORD: ${POSTGRES_PASSWORD}
FLYWAY_PLACEHOLDERS_ALEMBIC_USERNAME: ${POSTGRES_DOMAIN_CC_USER}
FLYWAY_PLACEHOLDERS_ALEMBIC_SCHEMA: domain_cc
FLYWAY_PLACEHOLDERS_ALEMBIC_PASSWORD: ${POSTGRES_DOMAIN_CC_PW}
svc-bip-api:
profiles: ["all", "svc", "bip"]
image: va/abd_vro-svc-bip-api:latest
environment:
<<: [ *rabbitmq-placeholder-vars, *datadog-placeholder-vars ]
BIP_CLAIM_USERID: ${BIP_CLAIM_USERID}
BIP_CLAIM_SECRET: ${BIP_CLAIM_SECRET}
BIP_EVIDENCE_USERID: ${BIP_EVIDENCE_USERID}
BIP_EVIDENCE_SECRET: ${BIP_EVIDENCE_SECRET}
BIP_TRUSTSTORE: ${BIP_TRUSTSTORE}
BIP_PASSWORD: ${BIP_PASSWORD}
BIP_KEYSTORE: ${BIP_KEYSTORE}
BIP_CLAIM_URL: ${BIP_CLAIM_URL}
BIP_EVIDENCE_URL: ${BIP_EVIDENCE_URL}
ports:
- "10401:10401"
networks:
- intranet
depends_on:
<<: [ *svc-depends-on ]
svc-bgs-api:
profiles: ["all","svc","bgs"]
image: va/abd_vro-svc-bgs-api:latest
<<: [*common-sde-security, *common-security-opt]
environment:
<<: [*rabbitmq-placeholder-vars, *common-vars]
DOCKER_LOGS: "1"
networks:
- intranet
depends_on:
<<: [ *svc-depends-on ]
# NOTE: svc-bie-kafka workflows are tied to inactive services and commented out to prevent unnecessary execution and updates.
# Documentation:
# - Disabling issue: https://github.com/department-of-veterans-affairs/abd-vro/issues/3802
# - BIE Docs: https://github.com/department-of-veterans-affairs/abd-vro/issues/3753
# svc-bie-kafka:
# # Expose healthcheck port for end2end test
# ports:
# - "10301:10301"
# profiles: [ "all","svc","kafka" ]
# image: va/abd_vro-svc-bie-kafka:latest
# <<: [ *common-sde-security, *common-security-opt ]
# environment:
# <<: [*rabbitmq-placeholder-vars, *postgres-vars, *common-vars]
# BIE_KAFKA_PLACEHOLDERS_BROKERS: mock-bie-kafka:9092
# BIE_KAFKA_PLACEHOLDERS_SCHEMA_REGISTRY: mock-bie-schema-registry:8081
# BIE_KAFKA_KEYSTORE_INBASE64: ${BIE_KAFKA_KEYSTORE_INBASE64}
# BIE_KAFKA_KEYSTORE_PASSWORD: ${BIE_KAFKA_KEYSTORE_PASSWORD}
# BIE_KAFKA_TRUSTSTORE_INBASE64: ${BIE_KAFKA_TRUSTSTORE_INBASE64}
# BIE_KAFKA_TRUSTSTORE_PASSWORD: ${BIE_KAFKA_TRUSTSTORE_PASSWORD}
# networks:
# - intranet
# depends_on:
# <<: [ *svc-depends-on ]
# NOTE: The vro-streamlit service is currently disabled because it is not actively used.
# vro-streamlit:
# profiles: ["all", "streamlit"]
# image: va/abd_vro-vro-streamlit:latest
# ports:
# - "8501:8501"
# environment:
# <<: [*common-vars]
# STREAMLIT_SERVER_PORT: 8501
# networks:
# - intranet