feat: database with tortoise orm
This commit is contained in:
+33
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user