chore: clean install

This commit is contained in:
Julien Calixte
2026-05-27 22:45:46 +02:00
parent 02b89410f0
commit c71718ccbc
3 changed files with 58 additions and 76 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
# syntax=docker/dockerfile:1
# --- Build stage: install deps and produce the Nuxt/Nitro output ---
FROM node:24-alpine AS build
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
# --- Runtime stage: minimal image running the built server ---
FROM node:24-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production \
PORT=3000 \
HOST=0.0.0.0
# Built server plus the migration SQL, which a Nitro plugin applies on boot.
COPY --from=build --chown=node:node /app/.output ./.output
COPY --from=build --chown=node:node /app/server/db/migrations ./server/db/migrations
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD wget -qO- http://127.0.0.1:3000/api/health >/dev/null 2>&1 || exit 1
CMD ["node", ".output/server/index.mjs"]