From 4f469a74528b2fc1e71465b0b862a4f66bfd97f9 Mon Sep 17 00:00:00 2001 From: OMPRAKASH MISHRA Date: Wed, 1 May 2024 14:52:48 -0700 Subject: [PATCH] fix schemaspy and flyway default schema Signed-off-by: OMPRAKASH MISHRA --- .github/workflows/scheduled.yml | 4 ++-- docker-compose.yml | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index f89cd8ac4..5af1f3f00 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -77,7 +77,7 @@ jobs: FLYWAY_USER: postgres FLYWAY_PASSWORD: default FLYWAY_LOCATIONS: filesystem:./migrations - FLYWAY_DEFAULT_SCHEMA: "USERS" + FLYWAY_DEFAULT_SCHEMA: "users" with: args: info migrate info @@ -86,7 +86,7 @@ jobs: mkdir output chmod a+rwx -R output - name: Run Schemaspy - run: docker run --network host -v "$PWD/output:/output" schemaspy/schemaspy:6.2.4 -t pgsql11 -db default -host 127.0.0.1 -port 5432 -u postgres -p default -schemas USERS + run: docker run --network host -v "$PWD/output:/output" schemaspy/schemaspy:6.2.4 -t pgsql11 -db default -host 127.0.0.1 -port 5432 -u postgres -p default -schemas users - name: Deploy to Pages uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/docker-compose.yml b/docker-compose.yml index d758cfacd..5ee745e70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,11 +35,18 @@ services: FLYWAY_USER: *POSTGRES_USER FLYWAY_PASSWORD: *POSTGRES_PASSWORD FLYWAY_BASELINE_ON_MIGRATE: true - FLYWAY_DEFAULT_SCHEMA: USERS + FLYWAY_DEFAULT_SCHEMA: users depends_on: database: condition: service_healthy - + schema_spy: + image: schemaspy/schemaspy:6.2.4 + container_name: schemaspy + command: -t pgsql11 -db postgres -host database -port 5432 -u postgres -p default -schemas users + depends_on: + migrations: + condition: service_completed_successfully + volumes: ["./output:/output"] backend: container_name: backend entrypoint: sh -c "npm i && npm run start:dev"