Files
MichilisandClaude Opus 5.5 f09445b6ad
ci / check (push) Canceled after 0s
ci / images (push) Canceled after 0s
ci / e2e (push) Canceled after 0s
Initial commit
Paper Sats: design and print paper notes that carry sats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 05:15:30 +00:00

24 lines
1004 B
Docker

# Production image for the web app. Build from the repository root:
# docker build -f infra/Dockerfile.web -t paper-sats-web .
# Also runs the database migrations (see docker-compose.prod.yml), which is why tsx stays installed.
FROM node:22-slim AS build
RUN corepack enable
WORKDIR /repo
COPY . .
RUN pnpm install --frozen-lockfile
# next build reads config at runtime only, so these placeholders never reach the image's runtime.
# A server started with them refuses to run, see packages/core/src/config.ts.
RUN APP_URL=http://build.invalid DATABASE_URL=postgres://build.invalid \
SESSION_SECRET=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= \
pnpm --filter @paper-sats/web exec next build
FROM node:22-slim
RUN useradd --create-home app
COPY --chown=app:app --from=build /repo /repo
WORKDIR /repo/apps/web
USER app
ENV NODE_ENV=production
EXPOSE 3000
# Node directly, not through pnpm, so SIGTERM reaches the server.
CMD ["node", "node_modules/next/dist/bin/next", "start", "--port", "3000"]