From de0a475a57522cea0f1dd88b15c5fab6d6f6f053 Mon Sep 17 00:00:00 2001 From: "Adrian A. Baumann" Date: Thu, 16 Oct 2025 16:15:57 +0200 Subject: [PATCH] Static collection in Docker build --- Dockerfile | 1 + argocd/deployment.yaml | 2 +- staticfiles/css/admin_extras.css | 14 -------------- staticfiles/js/inline_toggle.js | 24 ------------------------ 4 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 staticfiles/css/admin_extras.css delete mode 100644 staticfiles/js/inline_toggle.js diff --git a/Dockerfile b/Dockerfile index d1d3e56..318de06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,5 +29,6 @@ RUN rm -rf /app/Dockerfile* \ /app/data-loader \ /app/keys \ /app/requirements.txt +RUN python3 manage.py collectstatic CMD ["gunicorn","--bind","0.0.0.0:8000","--workers","3","VorgabenUI.wsgi:application"] diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index b4da773..b6cd5f9 100644 --- a/argocd/deployment.yaml +++ b/argocd/deployment.yaml @@ -25,7 +25,7 @@ spec: mountPath: /data containers: - name: web - image: git.baumann.gr/adebaumann/vui:0.927 + image: git.baumann.gr/adebaumann/vui:0.928 imagePullPolicy: Always ports: - containerPort: 8000 diff --git a/staticfiles/css/admin_extras.css b/staticfiles/css/admin_extras.css deleted file mode 100644 index 2e15826..0000000 --- a/staticfiles/css/admin_extras.css +++ /dev/null @@ -1,14 +0,0 @@ -.nested-inline h3 { - background-color: #f3f3f3; - border-bottom: 1px solid #ccc; - padding: 0.4em; - margin: 0; - font-weight: bold; - cursor: pointer; - } - - .nested-inline fieldset.module { - margin-bottom: 1em; - border: 1px solid #ccc; - padding: 0; - } \ No newline at end of file diff --git a/staticfiles/js/inline_toggle.js b/staticfiles/js/inline_toggle.js deleted file mode 100644 index 7ec2f67..0000000 --- a/staticfiles/js/inline_toggle.js +++ /dev/null @@ -1,24 +0,0 @@ -document.addEventListener("DOMContentLoaded", function () { - const inlineSections = document.querySelectorAll(".nested-inline fieldset.module"); - - inlineSections.forEach(section => { - const header = section.querySelector("h2"); - const content = Array.from(section.children).filter(child => !child.matches("h2")); - - if (header && content.length > 0) { - header.style.cursor = "pointer"; - header.style.userSelect = "none"; - header.style.background = "#f3f3f3"; - header.style.borderBottom = "1px solid #ccc"; - header.style.padding = "4px"; - - // Collapse by default - content.forEach(el => el.style.display = "none"); - - header.addEventListener("click", () => { - const currentlyVisible = content[0].style.display !== "none"; - content.forEach(el => el.style.display = currentlyVisible ? "none" : "block"); - }); - } - }); -}); \ No newline at end of file