Feature: pre-compress static files on ARM64 (#11721)

This commit is contained in:
Trenton H
2026-01-06 09:10:32 -08:00
committed by GitHub
parent a0744f179f
commit ba42f0eb4f
2 changed files with 4 additions and 10 deletions

View File

@@ -216,9 +216,9 @@ jobs:
GHCR_REPO: ${{ env.REGISTRY }}/${{ needs.build-arch.outputs.repository }}
run: |
for tag in ${TAGS}; do
dockerhub_tag="${tag/${GHCR_REPO}/paperlessngx/paperless-ngx}"
dockerhub_tag="${tag/${GHCR_REPO}/docker.io/paperlessngx/paperless-ngx}"
echo "Copying ${tag} to ${dockerhub_tag}"
docker buildx imagetools create --tag "${dockerhub_tag}" "${tag}"
skopeo copy --all "docker://${tag}" "docker://${dockerhub_tag}"
done
- name: Copy to Quay.io
if: needs.build-arch.outputs.push-external == 'true'
@@ -229,5 +229,5 @@ jobs:
for tag in ${TAGS}; do
quay_tag="${tag/${GHCR_REPO}/quay.io/paperlessngx/paperless-ngx}"
echo "Copying ${tag} to ${quay_tag}"
docker buildx imagetools create --tag "${quay_tag}" "${tag}"
skopeo copy --all "docker://${tag}" "docker://${quay_tag}"
done

View File

@@ -8,7 +8,6 @@ import os
import tempfile
from os import PathLike
from pathlib import Path
from platform import machine
from typing import Final
from urllib.parse import urlparse
@@ -423,14 +422,9 @@ ASGI_APPLICATION = "paperless.asgi.application"
STATIC_URL = os.getenv("PAPERLESS_STATIC_URL", BASE_URL + "static/")
WHITENOISE_STATIC_PREFIX = "/static/"
if machine().lower() == "aarch64": # pragma: no cover
_static_backend = "django.contrib.staticfiles.storage.StaticFilesStorage"
else:
_static_backend = "whitenoise.storage.CompressedStaticFilesStorage"
STORAGES = {
"staticfiles": {
"BACKEND": _static_backend,
"BACKEND": "whitenoise.storage.CompressedStaticFilesStorage",
},
"default": {"BACKEND": "django.core.files.storage.FileSystemStorage"},
}