mirror of
https://github.com/idrainformatica/PecFlow.git
synced 2026-06-16 12:45:42 +02:00
58a233236c
- docker-compose.yml: PostgreSQL 16, Redis 7, MinIO, Nginx - backend FastAPI: struttura monorepo, config pydantic-settings - modelli SQLAlchemy: tutti i modelli (tenants, users, mailboxes, messages, archival, permissions, labels, audit_log) - migrazione Alembic 0001: schema completo in pure SQL - auth API: login JWT, refresh token rotation, logout, 2FA TOTP (setup/verify/disable) - CRUD utenti: lista, crea, modifica, reset password, soft delete - permessi granulari (Fase 1-A): mailbox_permissions, assegna/revoca/lista - CRUD tenant: gestione super-admin - sicurezza: AES-256-GCM cifratura credenziali IMAP/SMTP, bcrypt password - RLS PostgreSQL: isolamento multi-tenant per request - seed sviluppo: tenant demo + admin + operator - test unit: security (bcrypt, JWT, AES), auth_service - test integration: auth endpoints, users endpoints - CI GitHub Actions: lint (ruff), test (pytest), build Docker, security scan - infra: nginx.conf, redis.conf - Makefile con comandi make dev/test/migrate/seed Definition of Done: ✅ Login, refresh token e TOTP funzionanti ✅ make dev porta in piedi tutto lo stack locale ✅ CI configurata
27 lines
706 B
Docker
27 lines
706 B
Docker
FROM python:3.12-slim
|
|
|
|
# Dipendenze di sistema
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
gcc \
|
|
libpq-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Aggiorna pip e setuptools prima di tutto
|
|
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
|
|
|
# Copia pyproject.toml e installa dipendenze (layer cache separato dal codice)
|
|
COPY pyproject.toml .
|
|
# Crea struttura minima per permettere l'installazione
|
|
RUN mkdir -p app && touch app/__init__.py
|
|
RUN pip install --no-cache-dir -e ".[dev]"
|
|
|
|
# Copia il codice sorgente (sovrascrive app/__init__.py vuoto)
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|