Skip to content

Commit

Permalink
Adding Schema Spy to local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
agordon-vivid committed Dec 13, 2024
1 parent f08bee8 commit 3cbca73
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
schemaspy/schemaspy-output
htmlReport/
/target
/.vscode
Expand Down
29 changes: 28 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
api:
profiles:
- api
- api
build:
context: .
dockerfile: server/wfprev-api/Dockerfile.graalvm
Expand Down Expand Up @@ -65,6 +65,33 @@ services:
retries: 5
start_period: 10s

schemaspy:
profiles:
- schemaspy
build:
context: .
dockerfile: schemaspy/Dockerfile
container_name: schemaspy
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
command:
[
"-t", "pgsql",
"-host", "wfprev-postgres",
"-port", "5432",
"-db", "wfprev",
"-u", "wfprev",
"-p", "${POSTGRES_PASSWORD}",
"-debug"
]
volumes:
- ./schemaspy/schemaspy-output:/output
networks:
- wfprev-network

networks:
wfprev-network:
driver: bridge
Expand Down
10 changes: 10 additions & 0 deletions schemaspy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM schemaspy/schemaspy:latest

USER root
RUN addgroup -S schemaspy && adduser -S schemaspy -G schemaspy
RUN mkdir -p /drivers /output && chown -R schemaspy:schemaspy /drivers /output

RUN apk update && apk add --no-cache curl
RUN curl -fSL https://jdbc.postgresql.org/download/postgresql-42.7.4.jar -o /drivers/postgresql.jar

USER schemaspy

0 comments on commit 3cbca73

Please sign in to comment.