diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2022-02-17 20:41:39 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2022-02-17 20:41:39 +0800 |
commit | 60006a9eb9ceaee5d487c6b27f5e0b7e64d3743e (patch) | |
tree | a51f3d63663c61e73c7d9064e4fb2df21f872573 | |
parent | 2e8685a3bdb8d1e19e9b859459810d038a169943 (diff) |
feat: add Dockerfile
-rwxr-xr-x | .scripts/publish.sh | 2 | ||||
-rw-r--r-- | Dockerfile | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/.scripts/publish.sh b/.scripts/publish.sh index e244951..cbe99e5 100755 --- a/.scripts/publish.sh +++ b/.scripts/publish.sh @@ -7,4 +7,4 @@ set -ev cd packages/svgbob && cargo publish && cd - && \ echo "sleeping" && sleep 20 &&\ -cd packages/cli && cargo publish && cd - +cd packages/svgbob_cli && cargo publish && cd - diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e3a7d05 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Creates REST API for converting ASCII text to Svgbob diagrams +# +# QUICK START: +# docker build --tag svgbob-rest-api . +# docker container run --rm -p80:80 svgbob-rest-api +# +# SAMPLE API REQUEST using curl: +# curl -X POST -F 'ascii=o------>' http://localhost > output.svg + + +FROM rust:latest + +################## INSTALL SVGBOB SERVER ################## + +RUN cargo install svgbob_server + +ENV PORT=80 + +EXPOSE 80 + +CMD "svgbob_server" |