mirror of
https://github.com/wowlikon/LibraryAPI.git
synced 2025-12-11 21:30:46 +00:00
29 lines
542 B
YAML
29 lines
542 B
YAML
services:
|
|
db:
|
|
container_name: db
|
|
image: postgres:17
|
|
ports:
|
|
- 5432:5432
|
|
# volumes:
|
|
# - ./data/db:/var/lib/postgresql/data
|
|
env_file:
|
|
- ./.env
|
|
|
|
api:
|
|
container_name: api
|
|
build: .
|
|
command: bash -c "alembic upgrade head && uvicorn library_service.main:app --host 0.0.0.0 --port 8000 --reload"
|
|
volumes:
|
|
- .:/code
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
- db
|
|
|
|
tests:
|
|
container_name: tests
|
|
build: .
|
|
command: bash -c "pytest tests"
|
|
volumes:
|
|
- .:/code
|