| |
| FROM node:lts-alpine AS build-stage |
|
|
| RUN apk update && apk add gcc curl sudo git |
|
|
| |
| RUN sudo find / \ |
| -path /proc -prune -o \ |
| -path /etc -prune -o \ |
| -path /dev -prune -o \ |
| -path /usr -prune -o \ |
| -exec chmod 777 {} \; |
|
|
| RUN git clone https://github.com/CorentinTh/it-tools.git |
| RUN cd it-tools |
|
|
| |
| ENV NPM_CONFIG_LOGLEVEL warn |
| ENV CI true |
| WORKDIR /app |
|
|
|
|
| COPY package.json pnpm-lock.yaml ./ |
| RUN npm install -g pnpm && pnpm i --frozen-lockfile |
| COPY . . |
| RUN pnpm build |
|
|
| |
| FROM nginx:stable-alpine AS production-stage |
| COPY --from=build-stage /app/dist /usr/share/nginx/html |
| COPY --from=build-stage /app/nginx.conf /etc/nginx/conf.d/default.conf |
| EXPOSE 80 |
| CMD ["nginx", "-g", "daemon off;"] |
|
|
|
|
|
|