Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align docker-compose with go-yaml/v3 #1472

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 33 additions & 78 deletions app/src/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ volumes:

# 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.
Expand Down Expand Up @@ -150,20 +151,15 @@ services:

app:
image: va/abd_vro-app:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: app
ports:
- "8080:8080"
- "8081:8081"
environment:
# ENV=local causes application-local.yml (and application-nonprod.yml) to be used, in addition to the default application.yml
# PERSIST_TRACKING_FOLDER is necessary for local testing when ENV=dev or qa
<<: *common-vars
<<: *rabbitmq-placeholder-vars
<<: *redis-placeholder-vars
<<: *postgres-vars
<<: *mas-vars
<<: [*mas-vars, *postgres-vars, *redis-placeholder-vars, *rabbitmq-placeholder-vars, *common-vars]
PERSIST_TRACKING_FOLDER: /persist/tracking
BIP_CLAIM_USERID: ${BIP_CLAIM_USERID}
BIP_CLAIM_SECRET: ${BIP_CLAIM_SECRET}
Expand Down Expand Up @@ -192,13 +188,10 @@ services:

xample-workflows:
image: va/abd_vro-xample-workflows:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
profiles: ["all","xample"]
environment:
<<: *redis-placeholder-vars
<<: *rabbitmq-placeholder-vars
<<: *postgres-vars
<<: [*postgres-vars, *rabbitmq-placeholder-vars, *redis-placeholder-vars]
depends_on:
postgres-service:
condition: service_healthy
Expand All @@ -209,12 +202,10 @@ services:

svc-xample-j:
image: va/abd_vro-svc-xample-j:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
profiles: ["all","svc","xample"]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -224,12 +215,9 @@ services:
svc-assessor-dc7101:
profiles: ["all","svc","assessor","v2"]
image: va/abd_vro-assessclaimdc7101:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -239,12 +227,9 @@ services:
svc-assessor-dc6602:
profiles: ["all","svc","assessor","v2"]
image: va/abd_vro-assessclaimdc6602:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -254,12 +239,9 @@ services:
svc-assessor-dc6602v2:
profiles: ["all","svc","assessor","prototype"]
image: va/abd_vro-assessclaimdc6602v2:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -269,12 +251,9 @@ services:
svc-assessor-cancer:
profiles: ["all","svc","assessor","prototype"]
image: va/abd_vro-assessclaimcancer:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -284,12 +263,9 @@ services:
svc-assessor-dc6510:
profiles: ["all","svc","assessor","prototype"]
image: va/abd_vro-assessclaimdc6510:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -299,12 +275,9 @@ services:
svc-assessor-dc6522:
profiles: ["all","svc","assessor","prototype"]
image: va/abd_vro-assessclaimdc6522:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars]
depends_on:
rabbitmq-service:
condition: service_healthy
Expand All @@ -314,14 +287,10 @@ services:
svc-pdf-generator:
profiles: ["all","svc","pdfgen"]
image: va/abd_vro-pdfgenerator:latest
<<: *common-security-opt
<<: *common-sde-security
<<: *python-healthcheck
<<: [*python-healthcheck, *common-sde-security, *common-security-opt]
environment:
MODE: "docker"
<<: *redis-placeholder-vars
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars, *redis-placeholder-vars]
depends_on:
redis-service:
condition: service_started
Expand All @@ -333,12 +302,10 @@ services:
svc-lighthouse-api:
profiles: ["all","svc","lh"]
image: va/abd_vro-service-data-access:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
environment:
# ENV=local causes application-local.properties to be used, in addition to the default application.properties
<<: *common-vars
<<: *rabbitmq-placeholder-vars
<<: [*rabbitmq-placeholder-vars, *common-vars]
LH_PRIVATE_KEY: ${LH_PRIVATE_KEY}
LH_ACCESS_CLIENT_ID: ${LH_ACCESS_CLIENT_ID}
depends_on:
Expand All @@ -350,11 +317,9 @@ services:
svc-bgs-api:
profiles: ["all","svc","bgs"]
image: va/abd_vro-svc-bgs-api:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
environment:
<<: *common-vars
<<: *rabbitmq-placeholder-vars
<<: [*rabbitmq-placeholder-vars, *common-vars]
# A mock-bgs-api needs to be created and exposes an unused port
BGS_BASE_URL: http://mock-bgs-api:9020
depends_on:
Expand All @@ -366,12 +331,9 @@ services:
svc-feature-toggle:
profiles: ["all","svc","feature-toggle"]
image: va/abd_vro-featuretoggle:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
environment:
<<: *redis-placeholder-vars
<<: *rabbitmq-placeholder-vars
<<: *rabbitmq-client-vars
<<: [*rabbitmq-client-vars, *rabbitmq-placeholder-vars, *redis-placeholder-vars]
depends_on:
redis-service:
condition: service_started
Expand All @@ -389,9 +351,7 @@ services:
stdin_open: true
tty: true
environment:
<<: *redis-placeholder-vars
<<: *rabbitmq-placeholder-vars
<<: *postgres-vars
<<: [*postgres-vars, *rabbitmq-placeholder-vars, *redis-placeholder-vars]
depends_on:
postgres-service:
condition: service_healthy
Expand All @@ -410,8 +370,7 @@ services:
mock-bip-ce-api:
profiles: ["all","mock","bip","v2-mocks"]
image: va/abd_vro-mock-bip-ce-api:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: mock-bip-ce-api
ports:
- "8094:8094"
Expand All @@ -431,8 +390,7 @@ services:
mock-bip-claims-api:
profiles: ["all","mock","bip","v2-mocks"]
image: va/abd_vro-mock-bip-claims-api:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: mock-bip-claims-api
ports:
- "8097:8097"
Expand All @@ -452,8 +410,7 @@ services:
mock-mas-api:
profiles: ["all","mock","mas","v2-mocks"]
image: va/abd_vro-mock-mas-api:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: mock-mas-api
ports:
- "9001:9001"
Expand All @@ -474,8 +431,7 @@ services:
mock-lighthouse-api:
profiles: ["all","mock","lh","v2-mocks"]
image: va/abd_vro-mock-lighthouse-api:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: mock-lighthouse-api
environment:
# ENV=local causes application-local.properties to be used, in addition to the default application.properties
Expand All @@ -488,8 +444,7 @@ services:
mock-slack:
profiles: ["all","mock","lh","v2-mocks"]
image: va/abd_vro-mock-slack:latest
<<: *common-security-opt
<<: *common-sde-security
<<: [*common-sde-security, *common-security-opt]
hostname: mock-slack
ports:
- "9008:9008"
Expand Down