Skip to content

Commit

Permalink
Make db port configurable via new env var.
Browse files Browse the repository at this point in the history
Signed-off-by: merobi-hub <merobi@gmail.com>
  • Loading branch information
merobi-hub committed Feb 20, 2024
1 parent 87dcdf6 commit 982009f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .circleci/api-load-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ services:
ports:
- "8080:8080"
environment:
DATABASE_URL: postgres://postgres:password@db:5432
DATABASE_URL: postgres://postgres:password@db:${DB_PORT}
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docker/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion marquez.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 982009f

Please sign in to comment.