oxynote/server/auth-realtime/Dockerfile.dev
dependabot[bot] 85392e0035
deps(docker): bump the safe group across 2 directories with 1 update (#143)
Bumps the safe group with 1 update in the /server/auth-realtime directory: node.
Bumps the safe group with 1 update in the /web directory: node.


Updates `node` from 24.20.0-alpine to 24.21.0-alpine

Updates `node` from 24.20.0-alpine to 24.21.0-alpine

---
updated-dependencies:
- dependency-name: node
  dependency-version: 24.21.0-alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: safe
- dependency-name: node
  dependency-version: 24.21.0-alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: safe
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-12 16:01:33 +03:00

36 lines
1.0 KiB
Docker

# inspired by: https://hono.dev/docs/getting-started/nodejs#dockerfile
FROM node:24.21.0-alpine AS base
FROM base AS builder
RUN apk add --no-cache gcompat
RUN npm install -g pnpm@11.1.3
WORKDIR /server
# pnpm-workspace.yaml carries the allowBuilds settings — without it the
# install refuses to run the esbuild install script.
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json tsconfig.build.json ./
COPY src ./src
# check-types gates (esbuild does not look at types); build:bundle emits
# the single-file runtime artifact the production image ships too
RUN pnpm install --frozen-lockfile && \
pnpm run check-types && \
pnpm run build:bundle
FROM base AS runner
WORKDIR /server
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 hono
# the bundle folds sentry in (no --import preload) and carries every
# dependency, so no node_modules are shipped.
COPY --from=builder --chown=hono:nodejs /server/dist/bundle.mjs /server/bundle.mjs
ENV NODE_ENV=production
USER hono
EXPOSE 8081
CMD ["node", "/server/bundle.mjs"]