From 227fb802bd2bef6f202589f49c8cfb17c168403a Mon Sep 17 00:00:00 2001 From: abdulla-ashurov Date: Thu, 29 Jun 2023 18:46:19 +0500 Subject: [PATCH] Use env variables instead of certs and key path. --- docker/with-external-db/docker-compose-with-db.yml | 6 +++--- docker/with-external-db/example.env | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 docker/with-external-db/example.env diff --git a/docker/with-external-db/docker-compose-with-db.yml b/docker/with-external-db/docker-compose-with-db.yml index f5354a73..513d713c 100644 --- a/docker/with-external-db/docker-compose-with-db.yml +++ b/docker/with-external-db/docker-compose-with-db.yml @@ -48,9 +48,9 @@ services: user: postgres volumes: - ./pg-init-scripts:/docker-entrypoint-initdb.d - - ./ssl-certificates/root.crt:/var/lib/postgresql/root.crt - - ./ssl-certificates/server.crt:/var/lib/postgresql/server.crt - - ./ssl-certificates/server.key:/var/lib/postgresql/server.key + - ${ROOT_CERT_PATH}:/var/lib/postgresql/root.crt + - ${SERVER_CERT_PATH}:/var/lib/postgresql/server.crt + - ${SERVER_KEY_PATH}:/var/lib/postgresql/server.key ports: - 5432:5432 # Edit the environment variables in postgres.env to change the database name, username, password, etc. diff --git a/docker/with-external-db/example.env b/docker/with-external-db/example.env new file mode 100644 index 00000000..a580be18 --- /dev/null +++ b/docker/with-external-db/example.env @@ -0,0 +1,4 @@ +# SSL certificates and key +ROOT_CERT_PATH="" +SERVER_CERT_PATH="" +SERVER_KEY_PATH=""