fix(deploy): exécuter sur le serveur + build CI réutilisé (~2 min)
Le deploy SSH depuis ubuntu-24.04 ne rebuildait pas sur 190 (image d'hier). Déploiement sur runner docker-host, artifact Next.js de la CI, Dockerfile.prebuilt, script deploy-prod.sh. workflow_run supprimé au profit de needs:[ci] même fichier. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
36
memento-note/Dockerfile.prebuilt
Normal file
36
memento-note/Dockerfile.prebuilt
Normal file
@@ -0,0 +1,36 @@
|
||||
# Image rapide : le build Next.js est déjà fait en CI (artifact).
|
||||
FROM node:22-bookworm-slim AS runner
|
||||
ARG GIT_COMMIT=unknown
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV GIT_COMMIT=$GIT_COMMIT
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
openssl \
|
||||
postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd --system --gid 1001 nodejs \
|
||||
&& useradd --system --uid 1001 --gid nodejs nextjs
|
||||
|
||||
COPY public ./public
|
||||
RUN mkdir -p ./data/uploads/notes ./data/backups && chown -R nextjs:nodejs ./data
|
||||
|
||||
COPY .next/standalone ./
|
||||
COPY .next/static ./.next/static
|
||||
|
||||
COPY prisma ./prisma
|
||||
COPY node_modules/.prisma ./node_modules/.prisma
|
||||
COPY node_modules/@prisma ./node_modules/@prisma
|
||||
COPY node_modules/prisma ./node_modules/prisma
|
||||
|
||||
COPY docker-entrypoint.sh ./docker-entrypoint.sh
|
||||
RUN chmod +x ./docker-entrypoint.sh
|
||||
|
||||
USER nextjs
|
||||
EXPOSE 3000
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME="0.0.0.0"
|
||||
ENTRYPOINT ["./docker-entrypoint.sh"]
|
||||
Reference in New Issue
Block a user