Files
LibraryAPI/docker-compose.yml
wowlikon 6658d773bf Global refactoring of the project to use poetry and implement tests,
fixing bugs, changing the handling of dto and db models, preparing to
add new functionality
2025-06-24 13:30:35 +03:00

31 lines
587 B
YAML

services:
db:
container_name: db_library
image: postgres
expose:
- 5432
volumes:
- ./data/db:/var/lib/postgresql/data
env_file:
- ./.env
api:
container_name: api_library
build: .
command: bash -c "alembic upgrade head && uvicorn library_service.main:app --reload --host 0.0.0.0 --port 8000"
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
tests:
container_name: tests
build: .
command: bash -c "pytest tests/test_misc.py"
volumes:
- .:/code
depends_on:
- db