summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorKristofer Hallin <kristofer@sunet.se>2022-01-25 15:39:14 +0100
committerKristofer Hallin <kristofer@sunet.se>2022-01-25 15:39:14 +0100
commitf4d44b76264c32b23d48bb8a3ed728b39d515854 (patch)
treed70b0e38b063a48d1a25774d6114bbdc2eec671d /Dockerfile
parentd1245f7f2ba2156159a369e8511e85d4e02deedb (diff)
Dockerize the whole thing.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..62a76c9
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+FROM node:latest as build
+
+WORKDIR /usr/src/app
+
+COPY package*.json ./
+
+RUN npm install
+
+ARG COLLECTOR_URL
+ARG JWT_URL
+ARG PER_PAGE
+
+COPY . ./
+
+RUN npm run build
+
+FROM nginx AS server
+WORKDIR /usr/share/nginx/html
+
+COPY --from=build /usr/src/app/dist ./
+
+COPY nginx-entrypoint.sh .
+COPY inject_template.js .
+RUN apt update
+RUN apt install -y gettext
+
+EXPOSE 80
+
+ENTRYPOINT ["sh", "./nginx-entrypoint.sh"] \ No newline at end of file