Next.js one-page portfolio presented as a versioned changelog, with placeholder content in src/data/profile.ts. Includes a standalone Docker image with a healthcheck and a compose file for Coolify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
894 B
Docker
31 lines
894 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM node:22-alpine AS deps
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine AS run
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production \
|
|
NEXT_TELEMETRY_DISABLED=1 \
|
|
PORT=3000 \
|
|
HOSTNAME=0.0.0.0
|
|
RUN addgroup -S app && adduser -S app -G app
|
|
COPY --from=build --chown=app:app /app/public ./public
|
|
COPY --from=build --chown=app:app /app/.next/standalone ./
|
|
COPY --from=build --chown=app:app /app/.next/static ./.next/static
|
|
USER app
|
|
EXPOSE 3000
|
|
# Coolify (and plain Docker) use this to decide when the new container is ready.
|
|
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget -qO- http://127.0.0.1:3000/ >/dev/null || exit 1
|
|
CMD ["node", "server.js"]
|