Skip to content

Commit

Permalink
Fixup cert secret envvars, require only in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Dec 22, 2023
1 parent 43c3c0d commit 58765eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
secrets:
tls-cert-file:
file: "${TLS_CERT_FILE:?TLS_CERT_FILE must be set}"
tls-key-file:
file: "${TLS_KEY_FILE:?TLS_KEY_FILE must be set}"


services:
usaon-benefit-tool:
image: "nsidc/usaon-benefit-tool:${USAON_BENEFIT_TOOL_VERSION:?USAON_BENEFIT_TOOL_VERSION must be set}"
Expand Down
12 changes: 5 additions & 7 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
secrets:
# HACK: the /dev/null default is because a value must be provided no matter
# what, but I don't want these envvars to be mandatory by default. Shouldn't
# need envvars to e.g. `docker compose exec` or `docker compose run`!
tls-cert-file:
file: "${TLS_CERT_FILE:?TLS_CERT_FILE must be set}"
# TODO: Re-enable `external` (i.e. require pre-existence) when compose
# supports this. When `external: true`, I get:
# unsupported external secret ...
# external: true
file: "${TLS_CERT_FILE:-/dev/null}"
tls-key-file:
file: "${TLS_KEY_FILE:?TLS_KEY_FILE must be set}"
# external: true
file: "${TLS_KEY_FILE:-/dev/null}"


services:
Expand Down

0 comments on commit 58765eb

Please sign in to comment.