From 982009fda25e5a741eab027d966c51daa2f1827c Mon Sep 17 00:00:00 2001 From: merobi-hub Date: Tue, 20 Feb 2024 11:30:40 -0500 Subject: [PATCH] Make db port configurable via new env var. Signed-off-by: merobi-hub --- .circleci/api-load-test.sh | 1 + docker-compose.db.yml | 2 +- docker-compose.dev.yml | 2 +- docker-compose.yml | 4 ++-- docker/up.sh | 1 + marquez.dev.yml | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/api-load-test.sh b/.circleci/api-load-test.sh index 8bb14c37fa..f5f5dc805a 100755 --- a/.circleci/api-load-test.sh +++ b/.circleci/api-load-test.sh @@ -22,6 +22,7 @@ readonly MARQUEZ_HOST="localhost" readonly MARQUEZ_ADMIN_PORT=8081 readonly MARQUEZ_URL="http://${MARQUEZ_HOST}:${MARQUEZ_ADMIN_PORT}" readonly MARQUEZ_DB="marquez-db" +readonly DB_PORT=5432 readonly METADATA_FILE="api/load-testing/metadata.json" readonly METADATA_STATS_QUERY=$(cat <<-END diff --git a/docker-compose.db.yml b/docker-compose.db.yml index 77cfa1e9fb..462d509301 100644 --- a/docker-compose.db.yml +++ b/docker-compose.db.yml @@ -4,7 +4,7 @@ services: image: postgres:14 container_name: marquez-db ports: - - "5432:5432" + - "${DB_PORT}:${DB_PORT}" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 8248837266..a4a53959ad 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -12,4 +12,4 @@ services: ports: - "8080:8080" environment: - DATABASE_URL: postgres://postgres:password@db:5432 + DATABASE_URL: postgres://postgres:password@db:${DB_PORT} diff --git a/docker-compose.yml b/docker-compose.yml index bf275001be..44eebd44f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,13 +15,13 @@ services: - "db:postgres" depends_on: - db - entrypoint: ["/opt/marquez/wait-for-it.sh", "db:5432", "--", "./entrypoint.sh"] + ENTRYPOINT /opt/marquez/wait-for-it.sh db:${DB_PORT} -- ./entrypoint.sh db: image: postgres:14 container_name: marquez-db ports: - - "5432:5432" + - "2345:2345" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password diff --git a/docker/up.sh b/docker/up.sh index 05b47a61bf..a4e9cf2d0c 100755 --- a/docker/up.sh +++ b/docker/up.sh @@ -64,6 +64,7 @@ compose_files="-f docker-compose.yml" API_PORT=5000 API_ADMIN_PORT=5001 WEB_PORT=3000 +DB_PORT=5432 NO_WEB="false" NO_VOLUMES="false" TAG="${VERSION}" diff --git a/marquez.dev.yml b/marquez.dev.yml index cbc0f0e71d..c102c2d28a 100644 --- a/marquez.dev.yml +++ b/marquez.dev.yml @@ -9,7 +9,7 @@ server: db: driverClass: org.postgresql.Driver - url: jdbc:postgresql://postgres:5432/marquez + url: jdbc:postgresql://postgres:${DB_PORT}/marquez user: marquez password: marquez