2022-12-15 17:18:25 +03:00
|
|
|
FROM node:18-alpine3.16 AS builder
|
2022-09-06 14:51:38 +03:00
|
|
|
|
2022-12-15 17:18:25 +03:00
|
|
|
# Required for argon2
|
|
|
|
RUN apk --no-cache add g++
|
|
|
|
RUN apk --no-cache add make
|
|
|
|
RUN apk --no-cache add python3
|
|
|
|
|
|
|
|
# Required for sharp
|
|
|
|
RUN apk --no-cache add vips-dev=8.12.2-r5
|
2022-09-06 14:51:38 +03:00
|
|
|
RUN npm install node-gyp -g
|
|
|
|
|
|
|
|
WORKDIR /api
|
|
|
|
COPY ./packages/system-api/package.json /api/package.json
|
|
|
|
RUN npm i
|
|
|
|
# ---
|
|
|
|
WORKDIR /dashboard
|
|
|
|
COPY ./packages/dashboard/package.json /dashboard/package.json
|
|
|
|
RUN npm i
|
|
|
|
|
|
|
|
WORKDIR /api
|
|
|
|
COPY ./packages/system-api /api
|
|
|
|
RUN npm run build
|
|
|
|
# ---
|
|
|
|
WORKDIR /dashboard
|
|
|
|
COPY ./packages/dashboard /dashboard
|
|
|
|
RUN npm run build
|
|
|
|
|
2022-12-15 17:18:25 +03:00
|
|
|
FROM node:18-alpine3.16 as app
|
2022-06-03 23:42:23 +03:00
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
|
|
|
WORKDIR /api
|
2022-12-15 17:18:25 +03:00
|
|
|
COPY ./packages/system-api/package.json /api/
|
2022-12-16 01:13:58 +03:00
|
|
|
COPY --from=builder /api/dist /api/dist
|
2022-10-08 00:35:48 +03:00
|
|
|
|
2022-10-15 12:54:45 +03:00
|
|
|
WORKDIR /dashboard
|
|
|
|
COPY --from=builder /dashboard/next.config.js ./
|
|
|
|
COPY --from=builder /dashboard/public ./public
|
|
|
|
COPY --from=builder /dashboard/package.json ./package.json
|
|
|
|
COPY --from=builder --chown=node:node /dashboard/.next/standalone ./
|
|
|
|
COPY --from=builder --chown=node:node /dashboard/.next/static ./.next/static
|
2022-06-03 23:42:23 +03:00
|
|
|
|
2022-09-06 14:51:38 +03:00
|
|
|
WORKDIR /
|