feat: database with tortoise orm
Python Lint CI / ty (push) Successful in 1m22s
Python Lint CI / ruff (push) Successful in 1m22s
Python Lint CI / ruff-format-check (push) Successful in 1m22s

This commit is contained in:
2026-07-01 11:43:10 +02:00
parent deba8a73f9
commit c93a74b0f4
14 changed files with 248 additions and 1 deletions
+33
View File
@@ -1,6 +1,9 @@
networks:
backend:
volumes:
postgres-data:
services:
app:
image: astral/uv:python3.14-alpine
@@ -11,9 +14,13 @@ services:
- APP_ENV=dev
- PORT=5000
- BIND=0.0.0.0
- DB_URL=postgres://tout-doux:tout-doux@postgres:5432/tout-doux
command: uv run tout-doux --debug
networks:
- backend
depends_on:
postgres:
condition: service_healthy
vite:
image: oven/bun:latest
@@ -25,3 +32,29 @@ services:
- "5173:5173"
networks:
- backend
postgres:
image: postgres:17
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready",
"-d",
"tout-doux",
"-U",
"tout-doux",
]
interval: 10s
timeout: 60s
retries: 3
start_period: 60s
environment:
- POSTGRES_DB=tout-doux
- POSTGRES_USER=tout-doux
- POSTGRES_PASSWORD=tout-doux
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- "postgres-data:/var/lib/postgresql/data"
networks:
- backend