Skip to content
Merged
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
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ services:
# A separate container makes the collision structurally impossible instead:
# same image, same source, but its OWN .next volume. Nothing to remember.
#
# Deliberately NOT `target: builder` — that stage builds at image-build time
# against a COPY of the source, and its downstream `runner` is dead anyway
# (#275: output:'export' never emits .next/standalone). We want the dev
# toolchain run against the live bind mount, which is what `dev` gives us.
# Uses `target: dev`, NOT a dedicated build stage: the former `builder`/`runner`
# production stages were REMOVED in #275 (output:'export' never emits
# .next/standalone, so the standalone `runner` could never build). We run the
# dev toolchain against the live bind mount and build via `pnpm build` below.
#
# `profiles:` is required, not cosmetic: without it `docker compose up` would
# start this service too, and it inherits CMD ["pnpm","run","dev"] from the
Expand Down
37 changes: 6 additions & 31 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,34 +150,9 @@ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# Start development server (Storybook can be run separately if needed)
CMD ["pnpm", "run", "dev"]

# Builder stage for production
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Build the application
RUN pnpm run build

# Production image
FROM base AS runner
WORKDIR /app

ENV NODE_ENV=production

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Copy built application
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT=3000
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]
# NOTE (#275): the former `builder` + `runner` production stages were removed.
# ScriptHammer deploys as a STATIC export (output: 'export' → out/ on GitHub
# Pages), so there is no long-running Node server image: the old `runner` copied
# `.next/standalone`, which output: 'export' never emits, so it could never
# build. Production builds run as `pnpm build` in the `dev` image via the
# `builder` compose service (see docker-compose.yml), writing out/ to the mount.
Loading