This commit is contained in:
2026-06-09 23:10:17 +02:00
parent 7b3b9a890f
commit 90e5f61b91
15 changed files with 911 additions and 86 deletions
+39
View File
@@ -10,6 +10,45 @@ services:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rezept_finder -d rezept_finder"]
interval: 5s
timeout: 5s
retries: 10
backend:
build:
context: ./backend
container_name: rezept_finder_backend
environment:
DATABASE_URL: postgresql+psycopg2://rezept_finder:rezept_finder@postgres:5432/rezept_finder
FRONTEND_ORIGIN: http://localhost:5173
SECRET_KEY: dev-secret
ports:
- "5000:5000"
volumes:
- ./backend:/app:Z
depends_on:
postgres:
condition: service_healthy
command: >
sh -c "python -c 'from app import create_app; from app.models import db; app = create_app(); ctx = app.app_context(); ctx.push(); db.create_all()'
&& python run.py"
frontend:
build:
context: ./frontend
container_name: rezept_finder_frontend
environment:
VITE_API_URL: http://localhost:5000
ports:
- "5173:5173"
volumes:
- ./frontend:/app:Z
- frontend_node_modules:/app/node_modules
depends_on:
- backend
volumes:
postgres_data:
frontend_node_modules: