34 lines
727 B
YAML
34 lines
727 B
YAML
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
develop:
|
|
watch:
|
|
- action: sync+restart
|
|
path: .
|
|
target: /opt/app
|
|
ignore:
|
|
- .venv/
|
|
- action: rebuild
|
|
path: ./pyproject.toml
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://postgres:changeme@db:5432/postgres
|
|
depends_on:
|
|
- db
|
|
db:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_PASSWORD: changeme
|
|
POSTGRES_DB: teufa
|
|
ports:
|
|
- "5432:5432"
|
|
migrate:
|
|
image: teufa:latest
|
|
command: teufa alembic upgrade head
|
|
environment:
|
|
DATABASE_URL: postgresql+psycopg://postgres:changeme@db:5432/postgres
|
|
depends_on:
|
|
- db
|