-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM node:24-alpine AS base
RUN apk update
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm
WORKDIR /app
# BUILDER STAGE
FROM base AS builder
COPY . .
RUN pnpm install --no-frozen-lockfile
RUN pnpm --filter bullstudio build
# RUNNER STAGE
FROM base AS runner
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 bullstudio
USER bullstudio
ENV NODE_ENV=production
ENV HOST=0.0.0.0
COPY --from=builder --chown=bullstudio:nodejs /app/apps/cli/dist/ ./apps/cli/dist/
COPY --from=builder --chown=bullstudio:nodejs /app/node_modules/ ./node_modules/
COPY --from=builder --chown=bullstudio:nodejs /app/apps/cli/node_modules/ ./apps/cli/node_modules/
ARG PORT=4000
EXPOSE ${PORT}
ENV PORT=${PORT}
CMD ["node", "./apps/cli/dist/server/production.js"]