forked from flawiddsouza/Restfox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
20 lines (19 loc) · 685 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Stage 1: Build the UI and web-standalone
FROM node:19.8.1-alpine3.17 AS build
RUN apk add --no-cache git
RUN mkdir /app
ADD .git /app/.git
ADD ./docs /app/docs
ADD ./packages/ui /app/packages/ui/
ADD ./packages/web-standalone /app/web-standalone/
WORKDIR /app/packages/ui
RUN npm ci && npm run build-web-standalone
WORKDIR /app/web-standalone
RUN npm ci
# Stage 2: Copy the necessary files from the build stage and remove unnecessary files
FROM node:19.8.1-alpine3.17
RUN mkdir -p /app/web-standalone/public
WORKDIR /app/web-standalone
COPY --from=build /app/web-standalone /app/web-standalone
COPY --from=build /app/packages/ui/dist /app/web-standalone/public
CMD ["npm", "start"]