update
This commit is contained in:
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM node:23-alpine AS base
|
||||
ENV NODE_ENV=production
|
||||
|
||||
FROM base AS builder
|
||||
RUN apk update
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
RUN npm install -g turbo
|
||||
COPY . .
|
||||
RUN turbo prune @morten-olsen/fluxcurrent-server --docker
|
||||
|
||||
FROM base AS installer
|
||||
RUN apk update
|
||||
RUN apk add --no-cache libc6-compat
|
||||
RUN corepack enable
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/out/json/ .
|
||||
RUN pnpm install --prod --frozen-lockfile
|
||||
|
||||
COPY --from=builder /app/out/full/ .
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# Don't run production as root
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 fluxcurrent
|
||||
COPY --from=installer /app/ ./
|
||||
USER fluxcurrent
|
||||
CMD ["node", "--no-warnings", "packages/server/src/start.ts"]
|
||||
Reference in New Issue
Block a user