Remove the admin panel's Environment tab and env-apply
Test and deploy / test (push) Successful in 2m2s
Test and deploy / deploy (push) Successful in 1m35s

.env is edited by hand again. Drops the /admin/env endpoints, EnvManager
and its registry, the host-side apply.py watcher and its install script,
the backend's env-apply bind mount, and the Environment tab.

The deploy and maintenance workflows still serialise docker compose, now
on .compose.lock in the checkout instead of env-apply/run/lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-15 15:29:55 +01:00
co-authored by Claude Opus 5.5
parent c9d599a371
commit 604ac32028
27 changed files with 54 additions and 2270 deletions
+4 -7
View File
@@ -87,9 +87,7 @@ jobs:
test -f "$SRC/python/requirements-dev.txt"
echo "Exported $SHA ($REF) to $SRC"
# The whole repo is mounted, not just backend/, because
# services/env_manager_test.go reads ../../.env.example to check
# it against env_registry.json. Read-only: tests write only to
# The whole repo is mounted read-only. Tests write only to
# t.TempDir(), and a read-only mount means the container (root)
# cannot leave root-owned files in $SRC that the clean-up step,
# running as the runner user, could not delete.
@@ -172,10 +170,9 @@ jobs:
env:
DOCKER_API_VERSION: "1.41"
COMPOSE_BAKE: "false"
# The lock is shared with env-apply/apply.py, so a deploy and a
# .env change made from the admin panel cannot run compose at
# the same time.
run: flock env-apply/run/lock docker compose up -d --build --remove-orphans
# The lock is shared with maintenance.yaml, so a deploy and the
# weekly rebuild cannot run compose at the same time.
run: flock .compose.lock docker compose up -d --build --remove-orphans
- name: Prune unused Docker resources
run: docker image prune -f
+11 -13
View File
@@ -21,28 +21,26 @@ jobs:
- name: Autoremove obsolete packages
run: sudo apt-get -y autoremove --purge
# Both compose steps below take env-apply/run/lock, the same flock
# deploy.yaml and env-apply/apply.py hold while they run compose.
# Without it this weekly job could recreate containers at the same
# moment a .env edit from the admin panel is being applied (or a
# deploy is mid-build), and two `compose up`s racing over the same
# project can each recreate a container the other just started,
# ending with services built against a half-written .env. flock
# blocks until the other holder finishes, so the job waits rather
# than fails. The lock is taken per step, not across both: nothing
# needs pull and up to be atomic, and holding it for less time
# keeps an admin-panel change from waiting behind a long pull.
# Both compose steps below take .compose.lock, the same flock
# deploy.yaml holds while it runs compose. Without it this weekly
# job could recreate containers while a deploy is mid-build, and
# two `compose up`s racing over the same project can each recreate
# a container the other just started. flock blocks until the other
# holder finishes, so the job waits rather than fails. The lock is
# taken per step, not across both: nothing needs pull and up to be
# atomic, and holding it for less time keeps a deploy from waiting
# behind a long pull.
- name: Pull latest base images
working-directory: /home/adamf/deploy/web_server
env:
DOCKER_API_VERSION: "1.41"
run: flock env-apply/run/lock docker compose pull
run: flock .compose.lock docker compose pull
- name: Rebuild and restart containers
working-directory: /home/adamf/deploy/web_server
env:
DOCKER_API_VERSION: "1.41"
run: flock env-apply/run/lock docker compose up -d --build --remove-orphans
run: flock .compose.lock docker compose up -d --build --remove-orphans
- name: Prune unused Docker images
run: docker image prune -af