teufa/compose.yml
2025-01-11 16:43:00 -07:00

34 lines
723 B
YAML

services:
teufa:
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
depends_on:
- db
environment:
DATABASE_URL: postgresql+psycopg://postgres:changeme@db:5432/postgres
command: alembic upgrade head