From 0bf22b33b1c719aa58bd4a3adc7f834cf14dfaa2 Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Mon, 25 Jan 2021 14:29:13 +1100 Subject: [PATCH] use npm run to run container --- manifest.yaml | 2 +- www/Dockerfile | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index d15508e..bf8d129 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -103,7 +103,7 @@ spec: secretKeyRef: { name: github-credentials, key: clientSecret }, } ports: - - containerPort: 80 + - containerPort: 3000 name: ui-port protocol: TCP resources: diff --git a/www/Dockerfile b/www/Dockerfile index c50c154..4784f13 100644 --- a/www/Dockerfile +++ b/www/Dockerfile @@ -7,11 +7,7 @@ COPY . /app RUN apk update \ && apk add --no-cache git python alpine-sdk\ - && npm ci \ - && npm run generate + && npm install --production \ + && npm run build -FROM nginx:alpine - -COPY --from=build /app/dist /usr/share/nginx/html - -EXPOSE 80 +CMD [ "npm", "start" ]