- Remove PAGE-07 from requirements (formation deleted per D-19) - No redirect, /formation returns 404 naturally - Plan 04 now includes full legacy src/ cleanup - Update success criteria: 7 routes, SMTP instead of EmailJS
6.5 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 03-pages-ship | 04 | execute | 3 |
|
|
true |
|
|
Purpose: Rend le portfolio deployable en production via Docker + Traefik avec analytics. Output: Dockerfile SSR fonctionnel, GA4 configure, docker-compose mis a jour.
<execution_context> @C:\Users\minit.claude\get-shit-done\workflows\execute-plan.md @C:\Users\minit.claude\get-shit-done\templates\summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/phases/03-pages-ship/03-CONTEXT.md @.planning/phases/03-pages-ship/03-RESEARCH.md @.planning/phases/03-pages-ship/03-02-SUMMARY.md @.planning/phases/03-pages-ship/03-03-SUMMARY.md@Dockerfile @docker-compose.yml @nuxt.config.ts
Task 1: Dockerfile SSR multi-stage + docker-compose Traefik port 3000 Dockerfile, docker-compose.yml **Dockerfile** (per D-12, D-13, INFRA-01) : Reecrire completement le Dockerfile existant (qui copie dist/ vers nginx). Implementation exacte du RESEARCH.md Pattern 6 :# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Runtime
FROM node:22-alpine AS runner
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
WORKDIR /app
COPY --from=builder /app/.output /app/.output
EXPOSE 3000
CMD ["node", "/app/.output/server/index.mjs"]
IMPORTANT : Copie .output/ PAS dist/ (per RESEARCH.md Pitfall 3). Pas de nginx. Node sert directement.
Ajouter un .dockerignore s'il n'existe pas :
node_modules
.nuxt
.output
dist
src
.git
*.md
.planning
docker-compose.yml (per D-14) : Modifier la ligne port Traefik :
- 'traefik.http.services.portfolio.loadbalancer.server.port=3000' # was 80
Changer uniquement cette ligne. Conserver tout le reste intact (labels Traefik TLS, routeurs, redirections www).
Ajouter les variables d'environnement SMTP dans la section environment du service portfolio :
environment:
- TZ=Europe/Paris
- NUXT_SMTP_HOST=${NUXT_SMTP_HOST}
- NUXT_SMTP_USER=${NUXT_SMTP_USER}
- NUXT_SMTP_PASS=${NUXT_SMTP_PASS}
- NUXT_SMTP_TO=${NUXT_SMTP_TO}
- NUXT_PUBLIC_GTAG_ID=${NUXT_PUBLIC_GTAG_ID}
Formation (per D-19) : Completement supprimee. Si app/pages/formation.vue existe, le supprimer. Pas de redirection, pas de routeRules — /formation retourne 404 naturellement.
Nettoyage complet legacy : Supprimer le dossier src/, old/, nginx.conf, index.html, eslint.config.ts, env.d.ts — tout le legacy de l'ancien SPA Vue. Le repo doit etre propre apres cette phase.
cd C:/Users/minit/Desktop/portfolio/portfolio && grep -q "production" nuxt.config.ts && ! test -f app/pages/formation.vue && ! test -d src && echo "PASS"
GA4 nuxt-gtag actif en production via runtimeConfig, formation completement supprimee, legacy src/ et fichiers SPA supprimes
<threat_model>
Trust Boundaries
| Boundary | Description |
|---|---|
| Docker env vars -> runtimeConfig | Variables SMTP passees au container via docker-compose |
STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|---|---|---|---|---|
| T-03-07 | Information Disclosure | docker-compose.yml | mitigate | Variables SMTP referencent ${VAR} pas de valeurs hardcodees — .env non commite |
| T-03-08 | Information Disclosure | Dockerfile | mitigate | .dockerignore exclut .planning, .git, src, node_modules |
| </threat_model> |
<success_criteria>
- Dockerfile utilise node:22-alpine en 2 stages, copie .output/, lance node server/index.mjs (per D-12)
- docker-compose port Traefik = 3000 (per D-14)
- Variables env SMTP + GA4 passees via docker-compose environment
- nuxt-gtag actif uniquement en production (per D-15)
- /formation retourne 404 (D-19), legacy src/ et fichiers SPA supprimes
- .dockerignore exclut node_modules, .nuxt, .output, src, .git </success_criteria>