diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index febafed8da3a35e0ae3dcacb0cc2ef9d5015e721..d82502b4fe8fd7f590f57105f05647bcae97a2ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,6 +45,6 @@ build_client: - docker:19.03.12-dind stage: build script: - - docker build -f app/client/Dockerfile -t client:v0.0.1 . + - docker build -f app/client/Dockerfile -t ${}client:v0.0.1 . only: - master diff --git a/app/client/Dockerfile b/app/client/Dockerfile index 5819965d3f5da5a786b022bb123425fac46d2d30..8fa3e6638af7871b48f11e68756a218d0c4c331c 100644 --- a/app/client/Dockerfile +++ b/app/client/Dockerfile @@ -16,7 +16,7 @@ RUN npm run build # Put this stuff into a nginx server FROM nginx:latest -# copy from previous build to this image + COPY --from=build /usr/src/app/build /usr/share/nginx/html EXPOSE 80 diff --git a/app/client/chart/client/values.yaml b/app/client/chart/client/values.yaml index 6e196411b07b439bbee6045e320467af728efc45..bb04687e21f813aa6144e2e49985310efcf6fbfb 100644 --- a/app/client/chart/client/values.yaml +++ b/app/client/chart/client/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: nginx + repository: nginx # !Change this to the actual image pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "" diff --git a/app/server/Dockerfile b/app/server/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..1a9fa7942572de252baee8b7314bfcdb5a45cc38 --- /dev/null +++ b/app/server/Dockerfile @@ -0,0 +1,15 @@ +FROM node:12.16.3 + +WORKDIR "/usr/app" + +COPY package*.json ./ + +COPY . . + +RUN npm install --production + +ENV PORT 3002 +ENV NODE_ENV production + +EXPOSE 3002 +CMD ["npm", "start"]