diff --git a/Dockerfile b/Dockerfile index a0343d6..42d78ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,18 @@ RUN if [ "$RELEASE_VERSION" != "latest" ] && [ -n "$GITHUB_TOKEN" ]; then \ pip install --no-cache-dir -r /tmp/requirements.txt; \ fi -# Copy application code -COPY . . +# Copy local source to temp location. +# In release builds we keep downloaded source in /app. +# In latest/local builds we copy from /app_local to /app. +COPY . /app_local + +RUN if [ "$RELEASE_VERSION" = "latest" ] || [ -z "$GITHUB_TOKEN" ]; then \ + echo "Using local source files..." && \ + cp -a /app_local/. /app/; \ + else \ + echo "Keeping downloaded release source in /app (no local override)"; \ + fi && \ + rm -rf /app_local # Create necessary directories RUN mkdir -p /app/logs /app/uploads /app/static /app/data diff --git a/RELEASE_NOTES_v2.2.40.md b/RELEASE_NOTES_v2.2.40.md new file mode 100644 index 0000000..33b89b7 --- /dev/null +++ b/RELEASE_NOTES_v2.2.40.md @@ -0,0 +1,18 @@ +# Release Notes v2.2.40 + +Dato: 3. marts 2026 + +## Hotfix: Production build source override +- Rettet Docker build-flow i `Dockerfile`, så release-kode hentet via `RELEASE_VERSION` ikke bliver overskrevet af lokal checkout under image build. +- Dette løser scenarier hvor produktion kører forkert kodeversion (fx manglende routes som `/dashboard/mission-control`) selv når korrekt release-tag er angivet. + +## Tekniske ændringer +- Lokal kildekode kopieres nu til midlertidig mappe (`/app_local`). +- Ved release-build (`RELEASE_VERSION != latest` og token sat) bevares downloadet release-kilde i `/app`. +- Ved local/latest-build kopieres `/app_local` til `/app` som før. + +## Verificering +- Build output skal vise: + - `Downloading release ... from Gitea...` + - `Keeping downloaded release source in /app (no local override)` +- Efter deploy skal `/dashboard/mission-control` ikke længere returnere 404 på release v2.2.39+. diff --git a/VERSION b/VERSION index fdaade6..f445ab1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.39 +2.2.40