Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Schema Spy to local builds #373

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading