https://github.com/andrewwhitehead/schemaspy-docker
Quickly run SchemaSpy on a database and serve the results
https://github.com/andrewwhitehead/schemaspy-docker
docker mysql postgresql schemaspy sqlite3
Last synced: about 1 year ago
JSON representation
Quickly run SchemaSpy on a database and serve the results
- Host: GitHub
- URL: https://github.com/andrewwhitehead/schemaspy-docker
- Owner: andrewwhitehead
- License: apache-2.0
- Created: 2017-06-15T18:49:35.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T13:01:45.000Z (over 5 years ago)
- Last Synced: 2023-03-05T05:03:52.872Z (over 3 years ago)
- Topics: docker, mysql, postgresql, schemaspy, sqlite3
- Language: Shell
- Size: 11.7 KB
- Stars: 7
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# schemaspy-docker
Quickly run SchemaSpy on a MySQL, Postgres or SQLite3 database in order
to generate a browsable visualization of the tables, columns, and relationships.
Based on `frolvlad/alpine-oraclejdk8:slim`. After running SchemaSpy to produce the
HTML content, the results are served by busybox httpd.
SchemaSpy is available at: https://github.com/schemaspy/schemaspy
See also: https://github.com/bcgov/schemaspy
## Sample Docker build command
```
docker build -t schemaspy https://github.com/cywolf/schemaspy-docker.git
```
## Sample MySQL Usage
```
docker run -ti --rm --name schemaspy \
-p 8080:8080 \
-e DATABASE_TYPE=mysql \
-e DATABASE_HOST=mysql -e DATABASE_NAME=mydatabase \
-e DATABASE_USER=root -e DATABASE_PASSWORD=mysecretpassword \
--link mysql \
schemaspy
```
## Sample Postgres Usage
```
docker run -ti --rm --name schemaspy \
-p 8080:8080 \
-e DATABASE_TYPE=pgsql \
-e DATABASE_HOST=postgres -e DATABASE_NAME=mydatabase \
-e DATABASE_USER=postgres -e DATABASE_PASSWORD=mysecretpassword \
--link postgres \
schemaspy
```
## Sample SQLite3 Usage
```
mkdir data && cp mydatabase.sqlite3 data/
docker run -ti --rm --name schemaspy \
-p 8080:8080 \
-v "$PWD/data":/app/data \
-e DATABASE_TYPE=sqlite \
-e DATABASE_NAME=/app/data/mydatabase.sqlite3 \
schemaspy
```
## Environment variables
`DATABASE_TYPE`: One of `mysql`, `pgsql`, or `sqlite`. Other database types are
supported by SchemaSpy, but their JDBC connector libraries are not currently
included.
`DATABASE_HOST`: The hostname of the database server, likely the name of
another Docker container which has been linked to this one.
`DATABASE_NAME`: The name of the target database.
`DATABASE_USER`, `DATABASE_PASSWORD`: The username and password used to establish
the database connection.