Release v2.0.5
This commit is contained in:
parent
08b7abbeea
commit
43c7d64a01
@ -8,7 +8,7 @@
|
|||||||
# RELEASE VERSION
|
# RELEASE VERSION
|
||||||
# =====================================================
|
# =====================================================
|
||||||
# Tag fra Gitea (f.eks. v1.0.0, v1.2.3)
|
# Tag fra Gitea (f.eks. v1.0.0, v1.2.3)
|
||||||
RELEASE_VERSION=v2.0.4
|
RELEASE_VERSION=v2.0.5
|
||||||
|
|
||||||
# =====================================================
|
# =====================================================
|
||||||
# GITEA AUTHENTICATION
|
# GITEA AUTHENTICATION
|
||||||
|
|||||||
8
RELEASE_NOTES_v2.0.5.md
Normal file
8
RELEASE_NOTES_v2.0.5.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Release Notes v2.0.5
|
||||||
|
|
||||||
|
## Fixes
|
||||||
|
- The migration execution endpoint now probes for the available container runtime (`docker` or `podman`) instead of assuming `docker`, preventing failures when Docker is absent but Podman is installed.
|
||||||
|
- Improved the validation error to clearly report when neither runtime is reachable and provided a more reliable command execution flow.
|
||||||
|
|
||||||
|
---
|
||||||
|
Release Date: 28. januar 2026
|
||||||
@ -9,6 +9,7 @@ from fastapi.responses import HTMLResponse
|
|||||||
from fastapi.templating import Jinja2Templates
|
from fastapi.templating import Jinja2Templates
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
@ -65,9 +66,15 @@ def execute_migration(payload: MigrationExecution):
|
|||||||
raise HTTPException(status_code=404, detail="Migration file not found")
|
raise HTTPException(status_code=404, detail="Migration file not found")
|
||||||
|
|
||||||
# Determine the container runtime (Podman or Docker)
|
# Determine the container runtime (Podman or Docker)
|
||||||
runtime = settings.CONTAINER_RUNTIME.lower()
|
runtime_preference = (settings.CONTAINER_RUNTIME or "").strip().lower()
|
||||||
if runtime not in {"docker", "podman"}:
|
available_runtimes = [cmd for cmd in ("podman", "docker") if shutil.which(cmd)]
|
||||||
runtime = "docker"
|
if not available_runtimes:
|
||||||
|
raise HTTPException(status_code=500, detail="No container runtime (docker/podman) found in PATH")
|
||||||
|
|
||||||
|
if runtime_preference and runtime_preference in available_runtimes:
|
||||||
|
runtime = runtime_preference
|
||||||
|
else:
|
||||||
|
runtime = available_runtimes[0]
|
||||||
|
|
||||||
command = [
|
command = [
|
||||||
runtime,
|
runtime,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user