- Add Grant model with proper typing (uuid.UUID, timezone-aware datetime) - Add DB enum for grant_type to enforce valid values at database level - Configure SQLAlchemy Base with datetime timezone mapping - Harden Dockerfile: pin uv version, non-root user, security env vars - Update docker-compose with correct healthcheck database name - Add default database_url for Docker Compose deployment - Add PYTHONUNBUFFERED and PYTHONDONTWRITEBYTECODE env vars - Clean up .gitignore (merged into root)
29 lines
No EOL
608 B
YAML
29 lines
No EOL
608 B
YAML
services:
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://myst:myst@db:5432/myst_db
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: myst
|
|
POSTGRES_PASSWORD: myst
|
|
POSTGRES_DB: myst_db
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U myst -d myst_db"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data: |