From b958324af0649054e6ffb737ebb58c648c54eca3 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Sun, 6 Dec 2020 08:02:22 +1100 Subject: [PATCH] Try to use node to serve website --- manifest.yaml | 2 +- www/Dockerfile | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index 5e53e60..c7a6604 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -125,7 +125,7 @@ metadata: spec: type: ClusterIP ports: - - port: 80 + - port: 3000 targetPort: ui-port protocol: TCP name: ui diff --git a/www/Dockerfile b/www/Dockerfile index 987d06f..f4bbabb 100644 --- a/www/Dockerfile +++ b/www/Dockerfile @@ -8,10 +8,13 @@ COPY . /app RUN apk update \ && apk add --no-cache git python alpine-sdk\ && npm ci \ + && npm run build \ && npm run generate -FROM nginx:alpine +# FROM nginx:alpine -COPY --from=build /app/dist /usr/share/nginx/html +# COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 3000 + +CMD [ "npm", "run", "start" ]