about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMelonai <einebeere@gmail.com>2020-06-13 03:49:25 +0200
committerMelonai <einebeere@gmail.com>2020-06-13 03:49:25 +0200
commit5539abe770da491087afcd7dd1ccba1bf8f60631 (patch)
treef77fefde4b1c9af83df555af1258da3b25dabc13 /Dockerfile
parent85443434a6869fc6bae68d075595fb633fd74876 (diff)
downloadshorest-5539abe770da491087afcd7dd1ccba1bf8f60631.tar.zst
shorest-5539abe770da491087afcd7dd1ccba1bf8f60631.zip
deployment using docker
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b9a177a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,14 @@
+FROM ekidd/rust-musl-builder:latest AS rust
+ADD --chown=rust:rust . ./
+RUN cargo build --release
+
+FROM node:alpine
+RUN apk --no-cache add ca-certificates
+COPY --from=rust \
+    /home/rust/ \
+    /main
+WORKDIR /main/src
+RUN cd ./client && yarn install && yarn build;
+RUN mv ./target/x86_64-unknown-linux-musl/release/shorest ./shorest
+CMD ./shorest
+