Skip to content
Merged

Dev #19

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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.1] - 2026-03-25
### Fixed
- Fixed legacy `ENV` syntax warnings in frontend Dockerfile by updating to modern `key=value` format

## [1.0.0] - 2026-03-24
### Added
- Cloudflare tunnel support for secure external access
Expand Down
15 changes: 7 additions & 8 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
FROM node:20-alpine AS base

RUN npm install -g pnpm@latest

Comment on lines +3 to +4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Unpinned pnpm version 🐞 Bug ⛯ Reliability

The frontend Docker build installs pnpm via pnpm@latest, making builds non-reproducible and
vulnerable to future pnpm major changes that can break pnpm i --frozen-lockfile without any repo
changes. This can cause unexpected CI/CD and Docker build failures over time.
Agent Prompt
### Issue description
`frontend/Dockerfile` installs `pnpm@latest`, which makes builds non-reproducible and can break `pnpm i --frozen-lockfile` when pnpm releases a new major/lockfile format.

### Issue Context
The repo has `frontend/pnpm-lock.yaml` with `lockfileVersion: '9.0'` and `frontend/package.json` does not declare a `packageManager` field.

### Fix Focus Areas
- frontend/Dockerfile[1-18]
- frontend/package.json[1-41]

### Suggested fix
Either:
1) Pin pnpm in Dockerfile (e.g., `RUN npm i -g pnpm@<exact_version>`), or
2) Prefer Corepack + pin in `package.json` (add `"packageManager": "pnpm@<exact_version>"`) and use Corepack consistently in build stages.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install pnpm using corepack
RUN corepack enable pnpm

# Install dependencies based on the preferred package manager
COPY package.json pnpm-lock.yaml* ./
RUN pnpm i --frozen-lockfile
Expand All @@ -23,7 +22,7 @@ COPY . .

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED=1

# If using Next.js standalone output, ensure output: 'standalone' is in next.config.ts
RUN pnpm build
Expand All @@ -32,8 +31,8 @@ RUN pnpm build
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
Expand All @@ -48,8 +47,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs

EXPOSE 3000
ENV PORT 3000
ENV PORT=3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]