Public Access
Backend (FastAPI): - docker-compose with all 4 services - FastAPI app with health endpoints - SQLAlchemy models for all tables - Placeholder API endpoints for all routes - Config and database modules - requirements.txt with all dependencies Frontend (React): - package.json with React, Tailwind, React Query, React Router - Vite config with API proxy - Tailwind and TypeScript configs - Basic App with routing skeleton - Placeholder pages (Dashboard, MealDetail, Pantry) Infrastructure: - nginx config for reverse proxy - Dockerfile for backend and frontend
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://mealplanner:${POSTGRES_PASSWORD}@db:5432/mealplanner
|
|
- SENDGRID_API_KEY=${SENDGRID_API_KEY}
|
|
- LUCKY_CA_URL=${LUCKY_CA_URL}
|
|
- AI_IMAGE_ENABLED=${AI_IMAGE_ENABLED}
|
|
- LOG_LEVEL=${LOG_LEVEL:-INFO}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "3000:80"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_USER=mealplanner
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
- POSTGRES_DB=mealplanner
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U mealplanner -d mealplanner"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
depends_on:
|
|
- frontend
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|