blob: d65a9412b540a4609f2512959329c0fbd3bb1ca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/usr/bin/env sh
JDBC_DRIVER=postgresql-42.4.0.jar
SCHEMA_SPY=schemaspy-6.1.0.jar
if [ ! -f ${JDBC_DRIVER} ]; then
# https://jdbc.postgresql.org/download.html
wget https://jdbc.postgresql.org/download/postgresql-42.4.0.jar
fi
if [ ! -f ${SCHEMA_SPY} ]; then
wget https://github.com/schemaspy/schemaspy/releases/download/v6.1.0/schemaspy-6.1.0.jar
fi
# the driver included with the docker image is too old
# docker run \
# -v "${PWD}"/dbdocs:/output \
# schemaspy/schemaspy:6.1.0 \
# -u "$(cat ./postgres/pg_user_secret)" \
# -db "$(cat ./postgres/pg_db_secret)" \
# -t pgsql \
# -host 192.168.1.103 \
# -p "$(cat ./postgres/pg_pass_secret)" \
# -port 5432 \
# -s public
java -jar ${SCHEMA_SPY} \
-o "${PWD}/dbdocs" \
-u "$(cat ./postgres/pg_user_secret)" \
-db "$(cat ./postgres/pg_db_secret)" \
-t pgsql \
-host 192.168.1.103 \
-p "$(cat ./postgres/pg_pass_secret)" \
-port 5432 \
-dp . \
-noviews
|