-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (21 loc) · 741 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (21 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
RUN npm run build:dashboard
FROM node:20-alpine
WORKDIR /app
RUN addgroup -S ccmux && adduser -S -G ccmux ccmux
COPY --from=build --chown=ccmux:ccmux /app/dist ./dist
COPY --from=build --chown=ccmux:ccmux /app/src/dashboard/frontend/dist ./src/dashboard/frontend/dist
COPY --from=build --chown=ccmux:ccmux /app/src/policy/recipes ./src/policy/recipes
COPY --from=build --chown=ccmux:ccmux /app/package.json ./
COPY --from=build --chown=ccmux:ccmux /app/package-lock.json ./
COPY --from=build --chown=ccmux:ccmux /app/bin ./bin
RUN npm ci --omit=dev
USER ccmux
EXPOSE 8787
ENTRYPOINT ["node", "bin/ccmux.js"]
CMD ["start", "--foreground"]