Multidatabase in single Postgres Container

This commit is contained in:
2026-03-13 21:28:41 +01:00
parent 68072f1320
commit c2e0d0aade
2 changed files with 38 additions and 0 deletions

21
init-scripts/init_ollama.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# 1. Starte den Ollama-Server im Hintergrund
/bin/ollama serve &
OLLAMA_PID=$!
# 2. Warte, bis die API erreichbar ist
echo "Warte darauf, dass der Ollama-Server hochfährt..."
while ! curl -s http://localhost:11434/api/tags > /dev/null; do
sleep 2
done
echo "Ollama ist erreichbar! Prüfe/Lade das Modell 'granite4:tiny-h'..."
# 3. Lade das Modell herunter (falls noch nicht vorhanden)
ollama pull granite4:tiny-h
echo "Modell ist einsatzbereit!"
# 4. Halte den Container am Laufen, indem der Ollama-Prozess im Vordergrund gehalten wird
wait $OLLAMA_PID