Trois surfaces partagent désormais le même design system, Tailwind v4
et React 19 — au lieu d'avoir landing en HTML vanilla, app en React, et
blog en Adonis SSR :
* packages/ui — design system partagé (tokens Tailwind v4 + composants
TSX) extrait depuis apps/web : Brand, Gem, Button, Card, Chip, Eyebrow,
EmptyState. apps/web migre 41 imports vers @rubis/ui.
* apps/landing — nouvelle app Astro 6 SSR (rubis.pro), remplace l'ancienne
landing nginx vanilla. Embarque :
- Landing complète portée en sections React (Hero, Stats, Promise,
HowItWorks, Gamification, Legal, Pricing, FAQ, FinalCTA, Footnotes)
- Pages légales (mentions, confidentialité, CGV) via LegalLayout.astro
- Blog SSR (/blog, /blog/:slug) qui consomme /api/v1/posts
- sitemap.xml, blog/rss.xml, robots.txt en endpoints Astro
- SEO complet (canonical, hreflang, OG, Twitter Card, JSON-LD
Article/BreadcrumbList/Blog/SoftwareApplication)
* apps/api — BlogController réduit à 2 endpoints JSON (GET /api/v1/posts
+ GET /api/v1/posts/:slug). Suppression des templates SSR Adonis
(apps/api/app/blog/), de l'alias #blog/*, des deps react-dom et
@types/react-dom. PostTransformer + PostSummaryTransformer ajoutés.
Le service blog_renderer + le seeder + les 3 articles fondateurs
restent intacts (réutilisés par futurs admin + cron IA).
* Infra :
- Dockerfile.landing (multi-stage Node 22 + tini, Astro standalone)
- k3s/app/landing.yml (Deployment + Service rubis-landing:4321 +
ConfigMap avec API_URL=http://rubis-api.rubis.svc.cluster.local:3333)
- .gitea/workflows/deploy.yml mis à jour pour build rubis-landing
- .gitea/workflows/deploy-web.yml + Dockerfile.web : prennent en
compte packages/ui/ comme dépendance
- Suppression du Dockerfile nginx legacy + k3s/{deployment,service}.yml
- Suppression de landing/ (assets favicons migrés vers
apps/landing/public/)
* Docs : architecture.md (vue d'ensemble + §4bis apps/landing complet,
§3 endpoints JSON blog, layout monorepo), CLAUDE.md (stack technique,
documents associés, déploiement).
Note infra : l'ancien Deployment "rubis" (nginx) et son Service ne sont
PAS supprimés par la CI — à nettoyer manuellement après validation que
Traefik a été repointé sur rubis-landing:4321 dans le repo proxmox.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
72 lines
2.9 KiB
Docker
72 lines
2.9 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
# =============================================================================
|
|
# Rubis — image landing (Astro 6, React 19, Node SSR standalone)
|
|
# Sert rubis.pro (landing + pages légales + blog SSR fetch via apps/api).
|
|
# =============================================================================
|
|
#
|
|
# Astro adapter: @astrojs/node en mode "standalone" → bundle un mini-server
|
|
# Node dans dist/server/entry.mjs. Pas de nginx en frontal nécessaire au
|
|
# niveau du pod : Traefik (cluster) gère le TLS et le routing par hostname.
|
|
# =============================================================================
|
|
|
|
ARG NODE_VERSION=22.13.1
|
|
ARG PNPM_VERSION=10.0.0
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# base — node + pnpm + tini
|
|
# -----------------------------------------------------------------------------
|
|
FROM node:${NODE_VERSION}-alpine AS base
|
|
ARG PNPM_VERSION
|
|
RUN apk add --no-cache libc6-compat tini && \
|
|
corepack enable && \
|
|
corepack prepare pnpm@${PNPM_VERSION} --activate
|
|
WORKDIR /repo
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# deps — install workspace (avec devDeps pour le build Astro)
|
|
# -----------------------------------------------------------------------------
|
|
FROM base AS deps
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json tsconfig.base.json ./
|
|
COPY apps/landing/package.json ./apps/landing/
|
|
COPY packages/shared/package.json ./packages/shared/
|
|
COPY packages/ui/package.json ./packages/ui/
|
|
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
|
|
pnpm install --frozen-lockfile --filter @rubis/landing...
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# build — astro build (output: server, adapter Node standalone)
|
|
# -----------------------------------------------------------------------------
|
|
FROM deps AS build
|
|
COPY packages/shared ./packages/shared
|
|
COPY packages/ui ./packages/ui
|
|
COPY apps/landing ./apps/landing
|
|
RUN cd apps/landing && pnpm exec astro build
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# runner — runtime minimal, user non-root
|
|
# -----------------------------------------------------------------------------
|
|
FROM base AS runner
|
|
RUN addgroup -g 1001 -S nodejs && adduser -S astro -u 1001
|
|
|
|
ENV NODE_ENV=production \
|
|
HOST=0.0.0.0 \
|
|
PORT=4321 \
|
|
LOG_LEVEL=info
|
|
|
|
WORKDIR /app
|
|
|
|
# Astro standalone bundle suffit (server + client static + node_modules
|
|
# nécessaires à l'entry sont déjà inclus dans dist/).
|
|
COPY --from=build --chown=astro:nodejs /repo/apps/landing/dist /app/dist
|
|
|
|
USER astro
|
|
|
|
EXPOSE 4321
|
|
|
|
# Healthcheck simple : / répond 200 (page d'accueil prerenderée).
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
|
CMD wget -qO- http://127.0.0.1:4321/ >/dev/null 2>&1 || exit 1
|
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
CMD ["node", "/app/dist/server/entry.mjs"]
|