From d0b08db65495230e7b6458b0392824eff217436f Mon Sep 17 00:00:00 2001 From: catborise Date: Mon, 9 Nov 2026 11:32:22 +0300 Subject: [PATCH] fix(docker): the settings.py kept next to the compose file stays out of the image The README has Docker users keep their own settings.py next to the compose file and mount it. .dockerignore left out only webvirtcloud/settings.py, so the next docker compose build copied that file, with its LDAP password or SECRET_KEY, into an image layer. It is now ignored by Docker and git, and CI plants it among the files that must not reach the image. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea --- .dockerignore | 2 ++ .github/workflows/test.yml | 4 ++-- .gitignore | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index b83efe79..36da7ee2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,6 +14,8 @@ backups **/console/cert.pem* **/dhcpd.* webvirtcloud/settings.py +# the copy the README has Docker users keep next to the compose file +settings.py **/staticfiles # virtualenvs, caches and editor files diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e94fc45a..68c4f092 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -152,7 +152,7 @@ jobs: - name: Plant Secret Sentinels run: | mkdir -p data - for f in data/secret_key data/admin_password webvirtcloud/settings.py.bak \ + for f in data/secret_key data/admin_password settings.py webvirtcloud/settings.py.bak \ 'webvirtcloud/settings.py~' webvirtcloud/.settings.py.swp; do echo sentinel > "$f" done @@ -175,7 +175,7 @@ jobs: run: | docker run --rm --entrypoint sh webvirtcloud:ci -c ' cd /srv/webvirtcloud - for f in data/secret_key data/admin_password webvirtcloud/settings.py.bak \ + for f in data/secret_key data/admin_password settings.py webvirtcloud/settings.py.bak \ "webvirtcloud/settings.py~" webvirtcloud/.settings.py.swp; do if [ -e "$f" ]; then echo "$f is in the image"; exit 1; fi done' diff --git a/.gitignore b/.gitignore index 7a278dce..bab099bf 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ console/cert.pem* tags dhcpd.* webvirtcloud/settings.py +/settings.py .coverage htmlcov *.log