Add Dockerfile for website service
[pub/jan/aic18.git] / service-website / Dockerfile
index c394738c842c1ce2ae8c08bbef3b55b193803c01..6c8e0c6dbaa422a2b680e7ec70373cc28d04f87a 100644 (file)
@@ -1 +1,18 @@
-FROM node
+FROM node:10-alpine as react-build
+LABEL maintainer="Michael Winsauer <e1429715@student.tuwien.ac.at>"
+
+WORKDIR /app
+COPY . ./
+
+RUN ["yarn", "install"]
+RUN ["yarn", "build"]
+
+
+FROM nginx:alpine
+LABEL maintainer="Michael Winsauer <e1429715@student.tuwien.ac.at>"
+
+EXPOSE 80
+
+COPY --from=react-build /app/build /usr/share/nginx/html
+
+CMD ["nginx", "-g", "daemon off;"]