Change nginx port to 8080
[pub/jan/aic18.git] / service-website / Dockerfile
index 67fd379018917c5fe846c21ad7826309a7e86284..c189aa204b7ef8812600ae301d3779c2adb18d85 100644 (file)
@@ -1 +1,19 @@
-FROM alpine
+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
+COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
+
+CMD ["nginx", "-g", "daemon off;"]