feat: add API Key authentication, Dockerfile, and docker-compose

- core/auth.py: API Key auth via header X-API-Key (env PDFTOOLKIT_API_KEY)
  - Modo dev: sem chave configurada → acesso livre
  - Modo produção: exige chave, retorna 401/403
- api.py: endpoints protegidos com Depends(_auth_required)
  - /health e / permanecem públicos
- Dockerfile: multi-stage (base → api → web)
- docker-compose.yml: api + web com healthcheck, volumes e rede
- .env.example: template de variáveis de ambiente
- README.md: seções de autenticação e Docker
This commit is contained in:
CM Consultor
2026-08-09 02:38:19 +00:00
parent 84d4a1eab5
commit f16c53bd4c
8 changed files with 351 additions and 59 deletions

5
.gitignore vendored
View File

@@ -10,4 +10,7 @@ tmp/
*.egg-info/
dist/
build/
.pytest_cache/
.pytest_cache/
*.pyc
.tmp/
__pycache__