services: postgres: image: postgres:16-alpine container_name: trustos_postgres environment: POSTGRES_USER: trustos POSTGRES_PASSWORD: trustos_dev POSTGRES_DB: trustos ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U trustos -d trustos"] interval: 5s timeout: 5s retries: 10 backend: build: context: ../backend dockerfile: ../infra/Dockerfile.backend container_name: trustos_backend env_file: - ../backend/.env environment: DATABASE_URL: postgresql+asyncpg://trustos:trustos_dev@postgres:5432/trustos SYNC_DATABASE_URL: postgresql://trustos:trustos_dev@postgres:5432/trustos STORAGE_PATH: /app/storage ports: - "8000:8000" volumes: - ../backend:/app - storage:/app/storage depends_on: postgres: condition: service_healthy command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload frontend: build: context: ../frontend dockerfile: ../infra/Dockerfile.frontend container_name: trustos_frontend environment: # Empty = same-origin API calls (proxied to backend by nginx / Next rewrite). # Works via localhost, LAN IP, and Cloudflare tunnel without CORS. NEXT_PUBLIC_API_URL: "" API_INTERNAL_URL: "http://backend:8000" ports: - "3000:3000" volumes: - ../frontend:/app - /app/node_modules - /app/.next depends_on: - backend command: npm run dev volumes: pgdata: storage: