From 88a8273ebc79f96a780458ecade9e3be130021d3 Mon Sep 17 00:00:00 2001 From: Kekskurse Date: Wed, 25 Dec 2019 18:36:31 +0100 Subject: [PATCH] Stuff --- Dockerfile | 15 ++++++++++----- build.sh | 2 +- docker/start.sh | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22c8d357..76da46cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,18 @@ -FROM node:lts -RUN npm install -g http-server +FROM node:lts AS source-code WORKDIR /app -COPY package*.json ./ -RUN npm install COPY . . +RUN npm install RUN npm run build + +FROM nginx:1.17 + +WORKDIR /usr/share/nginx/html + +COPY --from=source-code /app/dist /usr/share/nginx/html + COPY docker/start.sh /start.sh RUN chmod uog+rwx /start.sh -EXPOSE 8080 +EXPOSE 80 CMD [ "/start.sh"] diff --git a/build.sh b/build.sh index 7e885676..3c204dbe 100644 --- a/build.sh +++ b/build.sh @@ -1,2 +1,2 @@ docker build -t docker.keks.cloud/keksaccount/gui:latest . -docker push docker.keks.cloud/keksaccount/gui:latest \ No newline at end of file +docker push docker.keks.cloud/keksaccount/gui:latest diff --git a/docker/start.sh b/docker/start.sh index a1930574..eeeec43e 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -1,3 +1,3 @@ #!/bin/sh -echo $VUE_APP_API_URL > dist/apiurl -http-server dist +echo $VUE_APP_API_URL > /usr/share/nginx/html/apiurl +nginx -g 'daemon off;'