aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@eficode.com>2019-12-19 13:53:21 +0200
committerJan Tuomi <jan.tuomi@eficode.com>2019-12-19 13:53:21 +0200
commitcfbfb43a5e06aac134002900a8630715dec1b9cb (patch)
treeaffd531f5e061717c0add425610027178995bb71 /Dockerfile
Initial commit
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..fa980b2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM node:alpine AS builder
+
+WORKDIR /app
+COPY package.json package-lock.json ./
+RUN npm ci
+
+COPY rollup.config.js ./
+COPY src ./src
+RUN npm run build
+
+FROM nginx:alpine AS server
+
+WORKDIR /usr/share/nginx/html
+RUN apk add --no-cache bash
+COPY nginx-entrypoint.sh /
+COPY --from=builder /app/dist ./
+
+ENTRYPOINT [ "bash", "/nginx-entrypoint.sh" ]