chore: initial project setup
Phase 0 — full project scaffold with: - Backend: FastAPI + SQLAlchemy 2.0 async + Alembic + PostgreSQL 16 - Frontend: React 18 + TypeScript + Vite + Tailwind CSS + shadcn/ui - Docker Compose (prod + dev override with hot-reload) - Health endpoint, CORS config, API proxy, env template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-budget}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-budget}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-budget_tracker}
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-budget}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-budget}:${POSTGRES_PASSWORD:-budget}@db:5432/${POSTGRES_DB:-budget_tracker}
|
||||
SECRET_KEY: ${SECRET_KEY:-change-me-in-production}
|
||||
CORS_ORIGINS: '["http://localhost:5173","http://localhost:3000"]'
|
||||
DEBUG: ${DEBUG:-false}
|
||||
ports:
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${FRONTEND_PORT:-3000}:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in New Issue
Block a user