Skip to content
Snippets Groups Projects

K8s deploy

Merged Remi PLANEL requested to merge k8s-deploy into dev
3 files
+ 11
7
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 6
2
### Stage Install ###
FROM node:19.5-bullseye-slim as install
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package*.json ./
@@ -40,14 +42,16 @@ CMD [ "node", "server/index.mjs"]
### STAGE: Generate ###
FROM node:19.5-bullseye-slim as generate
ARG NUXT_APP_BASE_URL
WORKDIR /usr/src/app
COPY --from=install /usr/src/app ./
COPY . /usr/src/app
RUN npm run generate
RUN NUXT_APP_BASE_URL=/wiki npm run generate
### STAGE: NGINX ###
FROM nginxinc/nginx-unprivileged:1.25
# RUN rm -rf /usr/share/nginx/html/*
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=generate /usr/src/app/.output/public /usr/share/nginx/html
COPY --from=generate /usr/src/app/.output/public /etc/nginx/html
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
Loading