Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26.5.0
26.5.1
28 changes: 15 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.7

ARG NODE_VERSION=26.5.0
ARG NODE_VERSION=26.5.1
ARG PNPM_VERSION=11.15.1

FROM node:${NODE_VERSION}-alpine AS external-clients
Expand Down Expand Up @@ -37,28 +37,30 @@ RUN DATABASE_URL="postgresql://user:password@localhost:5432/forums" pnpm prisma:
&& rm -rf node_modules \
&& pnpm install --prod --frozen-lockfile --ignore-scripts

FROM node:${NODE_VERSION}-alpine AS production
FROM alpine:3.24 AS production

ARG NODE_VERSION
RUN apk upgrade --no-cache \
&& rm -rf /usr/local/lib/node_modules/npm \
&& rm -f /usr/local/bin/npm /usr/local/bin/npx
&& apk add --no-cache nodejs-current=${NODE_VERSION}-r0 \
&& addgroup -S app \
&& adduser -S -D -H -u 10001 -G app app

# External Prisma clients are copied beside the application under /usr/src.
# Expose the application's production dependencies to their CommonJS imports.
ENV NODE_ENV=production \
NODE_PATH=/usr/src/app/node_modules
WORKDIR /usr/src/app

COPY --from=build --chown=node:node /usr/src/app/dist ./dist
COPY --from=build --chown=node:node /usr/src/app/node_modules ./node_modules
COPY --from=build --chown=node:node /usr/src/app/prisma/generated ./prisma/generated
COPY --from=build --chown=node:node /usr/src/app/package.json ./package.json
COPY --from=external-clients --chown=node:node /clients/challenge-api-v6/packages/challenge-prisma-client /usr/src/challenge-api-v6/packages/challenge-prisma-client
COPY --from=external-clients --chown=node:node /clients/identity-api-v6/packages/identity-prisma-client /usr/src/identity-api-v6/packages/identity-prisma-client
COPY --from=external-clients --chown=node:node /clients/member-api-v6/packages/member-prisma-client /usr/src/member-api-v6/packages/member-prisma-client
COPY --from=external-clients --chown=node:node /clients/resource-api-v6/packages/resources-prisma-client /usr/src/resource-api-v6/packages/resources-prisma-client
COPY --from=build --chown=app:app /usr/src/app/dist ./dist
COPY --from=build --chown=app:app /usr/src/app/node_modules ./node_modules
COPY --from=build --chown=app:app /usr/src/app/prisma/generated ./prisma/generated
COPY --from=build --chown=app:app /usr/src/app/package.json ./package.json
COPY --from=external-clients --chown=app:app /clients/challenge-api-v6/packages/challenge-prisma-client /usr/src/challenge-api-v6/packages/challenge-prisma-client
COPY --from=external-clients --chown=app:app /clients/identity-api-v6/packages/identity-prisma-client /usr/src/identity-api-v6/packages/identity-prisma-client
COPY --from=external-clients --chown=app:app /clients/member-api-v6/packages/member-prisma-client /usr/src/member-api-v6/packages/member-prisma-client
COPY --from=external-clients --chown=app:app /clients/resource-api-v6/packages/resources-prisma-client /usr/src/resource-api-v6/packages/resources-prisma-client

USER node
USER app
EXPOSE 3000

CMD ["node", "dist/main.js"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ but the `/moderation` endpoints require administrator role access for humans or

## Development

The supported local and container runtime is Node.js 26.5.0 with pnpm 11.15.1.
The supported local and container runtime is Node.js 26.5.1 with pnpm 11.15.1.
The checked-in `.nvmrc` selects the required Node.js release.
The production image installs Alpine's dynamically linked Node.js package and
runs as an unprivileged application user so patched system libraries are used at
runtime without shipping package-manager tooling.

```bash
nvm use
Expand Down
95 changes: 50 additions & 45 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ overrides:
'ajv@^8.0.0': 8.18.0
axios: 1.18.1
'body-parser@^2': 2.3.0
'brace-expansion@^1.0.0': 1.1.16
'brace-expansion@^2.0.0': 2.1.2
'brace-expansion@>=3': 5.0.7
'brace-expansion@^1.0.0': 1.1.18
'brace-expansion@^2.0.0': 2.1.4
'brace-expansion@>=3': 5.0.9
deepmerge-ts: 8.0.0
defu: 6.1.7
'effect@^3.0.0': 3.22.0
'fast-uri@^3.0.0': 3.1.4
'fast-uri@^3.0.0': 3.1.5
'file-type@^21.0.0': 21.3.2
find-my-way: 9.7.0
follow-redirects: 1.16.0
form-data: 4.0.6
hono: 4.12.31
'js-yaml@^3': 3.15.0
'js-yaml@^4.0.0': 4.3.0
hono: 4.12.34
'js-yaml@^3': 3.15.1
'js-yaml@^4.0.0': 4.3.1
'js-yaml@^5.0.0': 5.2.2
lodash: 4.18.1
'minimatch@^3.0.0': 3.1.4
'minimatch@^5.0.0': 5.1.8
Expand All @@ -41,6 +44,7 @@ overrides:
'picomatch@^4.0.0': 4.0.5
'piscina@^4.0.0': 4.9.3
qs: 6.15.3
valibot: 1.4.2

allowBuilds:
'@nestjs/core': false
Expand Down
Loading