2022-10-06 00:25:14 +03:00
|
|
|
FROM node:18 AS build
|
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-10-06 19:27:17 +03:00
|
|
|
FROM alpine:3.16.0 as app
|
2022-06-03 23:42:23 +03:00
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
|
2022-10-06 19:30:47 +03:00
|
|
|
# # Install dependencies
|
2022-10-06 19:27:17 +03:00
|
|
|
RUN apk --no-cache add nodejs npm
|
|
|
|
RUN apk --no-cache add g++
|
2022-10-06 00:25:14 +03:00
|
|
|
RUN apk --no-cache add make
|
2022-10-06 19:27:17 +03:00
|
|
|
RUN apk --no-cache add python3
|
|
|
|
|
2022-06-11 14:02:39 +03:00
|
|
|
RUN npm install node-gyp -g
|
2022-06-03 23:42:23 +03:00
|
|
|
|
|
|
|
WORKDIR /api
|
2022-06-22 22:28:48 +03:00
|
|
|
COPY ./packages/system-api/package*.json /api/
|
2022-10-06 00:25:14 +03:00
|
|
|
RUN npm install --omit=dev
|
2022-06-03 23:42:23 +03:00
|
|
|
|
|
|
|
WORKDIR /dashboard
|
2022-06-22 22:28:48 +03:00
|
|
|
COPY ./packages/dashboard/package*.json /dashboard/
|
2022-10-06 00:25:14 +03:00
|
|
|
RUN npm install --omit=dev
|
2022-06-03 23:42:23 +03:00
|
|
|
|
2022-09-06 14:51:38 +03:00
|
|
|
COPY --from=build /api/dist /api/dist
|
|
|
|
COPY --from=build /dashboard/.next /dashboard/.next
|
2022-06-03 23:42:23 +03:00
|
|
|
|
2022-09-06 14:51:38 +03:00
|
|
|
WORKDIR /
|