From 313ff8e184008ff9fd8ad032267973625432f671 Mon Sep 17 00:00:00 2001
From: William Kray <william@kray.pw>
Date: Wed, 28 Jul 2021 12:43:47 -0700
Subject: [PATCH] add dockerfile which builds a cinny container served by nginx

---
 Dockerfile | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..c4bd5a46
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+## Builder
+FROM node:14-alpine as builder
+
+WORKDIR /src
+
+COPY . /src
+RUN npm install \
+  && npm run build
+
+
+## App
+FROM nginx:alpine
+
+COPY --from=builder /src/dist /app
+COPY --from=builder /src/olm.wasm /app/olm.wasm
+
+# Insert wasm type into Nginx mime.types file so they load correctly.
+RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types
+
+RUN rm -rf /usr/share/nginx/html \
+  && ln -s /app /usr/share/nginx/html