diff --git a/updateto.sh b/updateto.sh index c9a78d8..09c07ad 100644 --- a/updateto.sh +++ b/updateto.sh @@ -62,6 +62,18 @@ echo "" echo "🔨 Bygger nyt image med version $VERSION..." podman-compose -f docker-compose.prod.yml up -d --build +# Sync migrations from container to host +echo "" +echo "📁 Syncer migrations fra container til host..." +if podman cp bmc-hub-api-prod:/app/migrations ./migrations_temp 2>/dev/null; then + rm -rf ./migrations + mv ./migrations_temp ./migrations + chmod -R 755 ./migrations + echo "✅ Migrations synced" +else + echo "⚠️ Warning: Could not sync migrations (container might not be ready yet)" +fi + # Wait a bit for startup echo "" echo "⏳ Venter på container startup..."