schemaspyをdocker-composeで動かす
official imageでschemaspyを導入する方法
docker-compose.yml
schemaspy: image: schemaspy/schemaspy volumes: - ./schemaspy/output:/output - ./schemaspy/config:/config container_name: "schemaspy_local" command: ["-configFile", "/config/schemaspy.properties"] links: - mysql nginx: image: nginx container_name: "nginx_for_schemaspy" ports: - "10080:80" volumes: - ./schemaspy/output:/usr/share/nginx/html:ro
schemaspy/config/schemaspy.properties
# type of database. Run with -dbhelp for details schemaspy.t=mysql # database properties: host, port number, name user, password schemaspy.host=mysql schemaspy.port=3306 schemaspy.db=sample schemaspy.u=db_user schemaspy.p=password # db scheme for which generate diagrams schemaspy.s=sample
docker-compose up
で起動すると、schemaspy/output
配下にschemaspyが生成したhtmlが出力され、http://localhost:10080
でアクセスできる。