Files
MeeJayandClaude Opus 5 93f0689c1e Initial import: LifeTrack v1 (santé, vape, finances)
Tracker de vie auto-hébergé : suivi poids/calories/sport avec planning de
pesées, sevrage tabac (vape) avec modèle de coût DIY et économies, et
finances personnelles avec import de relevés bancaires.

Architecture : FastAPI + SQLAlchemy 2.0 + PostgreSQL 16, React 18 + TS +
Vite + Tailwind + ECharts, déploiement Docker Compose. Modules
auto-découverts des deux côtés (pkgutil / import.meta.glob) et framework
de connecteurs à deux voies (importeurs de fichiers + ingestion JSON)
pour brancher de nouvelles sources sans toucher au noyau.

Validé : 292 tests pytest, tsc + vite build, contrat API/web vérifié
contre le schéma OpenAPI, et déploiement Docker réel sur PostgreSQL 16
(28 tables, SPA servie par nginx, wizard de premier démarrage).

Documentation : README.md, docs/GUIDE.md, CONVENTIONS.md, et les
documents de conception et de recherche dans docs/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:48:57 +02:00

25 lines
1.0 KiB
Docker

# LifeTrack web — React/Vite build served by nginx.
# Build context = repository root (docker-compose.yml).
FROM node:20-alpine AS build
WORKDIR /build
# Cap the V8 heap on small hosts (the self-hosted target has ~1 GB of usable
# RAM and `vite build` bundles echarts): docker compose passes NODE_OPTIONS
# through, empty by default so a normal machine keeps node's own heuristics.
ARG NODE_OPTIONS=""
ENV NODE_OPTIONS=$NODE_OPTIONS
# Explicit names (not package*.json): a missing lockfile must fail here, loudly,
# instead of turning into a confusing `npm ci` error.
COPY apps/web/package.json apps/web/package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY apps/web/ ./
RUN npm run build
FROM nginx:1.27-alpine
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /build/dist /usr/share/nginx/html
EXPOSE 80
# busybox wget ships with nginx:alpine; -O /dev/null keeps it out of the fs.
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
CMD ["wget", "-q", "-O", "/dev/null", "http://127.0.0.1/index.html"]