REST API for managing personal bookmarks (title, link, category). PostgreSQL database with async SQLAlchemy, containerized with Docker Compose. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
33 lines
750 B
YAML
33 lines
750 B
YAML
services:
|
|
favs-db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: favs
|
|
POSTGRES_PASSWORD: favs
|
|
POSTGRES_DB: favs
|
|
ports:
|
|
- "5433:5432"
|
|
volumes:
|
|
- favs_pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U favs"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
favs-api:
|
|
build: ./backend
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://favs:favs@favs-db:5432/favs
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
|
|
depends_on:
|
|
favs-db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./backend:/app
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
volumes:
|
|
favs_pgdata:
|