frontend/Dockerfile

16 lines
579 B
Docker
Raw Normal View History

2023-05-01 13:06:15 +00:00
FROM registry.odit.services/hub/library/node:20.0.0-alpine3.17 as build
2023-03-29 17:45:35 +00:00
ARG NPM_REGISTRY_URL=https://registry.npmjs.org
2020-12-20 17:09:58 +00:00
WORKDIR /app
2023-03-29 17:45:35 +00:00
2023-05-01 13:04:58 +00:00
COPY package.json pnpm-lock.yaml vite.config.js tailwind.config.js postcss.config.cjs index.html ./
2023-05-01 12:59:36 +00:00
RUN npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8
RUN mkdir /pnpm && pnpm config set store-dir /pnpm && pnpm i
2023-03-29 17:45:35 +00:00
2020-12-20 17:09:58 +00:00
COPY src ./src
COPY public ./public
2023-03-29 17:45:35 +00:00
RUN pnpm build
2020-12-20 17:09:58 +00:00
# final image
2023-02-02 16:21:58 +00:00
FROM registry.odit.services/library/nginx-brotli:3.15 as final
COPY --from=build /app/dist /usr/share/nginx/html
2020-12-20 17:09:58 +00:00
COPY ./nginx.conf /etc/nginx/nginx.conf