Last active
October 16, 2017 08:31
-
-
Save vnegrisolo/f6af747b1030dae3d1a1a8fcd2eee6a9 to your computer and use it in GitHub Desktop.
ERD from text file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM haskell:7.8.4 | |
RUN apt-get update && apt-get --assume-yes install graphviz vim curl git | |
RUN cabal update && cabal install graphviz parsec text && cabal install erd | |
COPY graph.in . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker build -f Dockerfile.erd -t erd . | |
docker run --rm erd bash -c 'erd -i graph.in' > graph.pdf | |
open graph.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title {label: "ERD (Entity-Relationship diagram)", size: "20"} | |
################################################################################ | |
# Entities | |
################################################################################ | |
[post] {bgcolor: "#dc322f"} | |
title {label: "string"} | |
[user] {bgcolor: "#cb4b16"} | |
email {label: "string"} | |
password {label: "string"} | |
################################################################################ | |
# Relationships | |
################################################################################ | |
user 1--* post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment