Skip to content

Commit

Permalink
If ENABLE_BARMAN is set to true, verify the other arguments are set a…
Browse files Browse the repository at this point in the history
…nd throw error if they aren't
  • Loading branch information
singhalkarun committed Jul 31, 2024
1 parent 2e9d9db commit 7e43a1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ ARG BARMAN_HOST

ENV BARMAN_HOST=$BARMAN_HOST

# Check if ENABLE_BARMAN is set to true, and if so, ensure other arguments are provided
# Check if ENABLE_BARMAN is set to true, and if so, ensure other arguments are provided
RUN if [ "$ENABLE_BARMAN" = "true" ]; then \
: "${DB_SSH_PRIVATE_KEY:?DB_SSH_PRIVATE_KEY is not set}"; \
: "${DB_SSH_PUBLIC_KEY:?DB_SSH_PUBLIC_KEY is not set}"; \
: "${BARMAN_HOST:?BARMAN_HOST is not set}"; \
fi

ADD config/postgresql.conf.template /etc/postgresql/postgresql.conf.template
ADD config/pg_hba.conf.template /etc/postgresql/pg_hba.conf.template

Expand Down

0 comments on commit 7e43a1e

Please sign in to comment.