Gate deploys on tests and share the nginx route table
Makefile: make check runs the backend, Python, Vue and compose checks that previously lived only in local notes. deploy.yaml: a test job runs the backend and Python suites in containers on every push, and deploy needs it. Deploy also refuses to run if main has moved past the tested commit. maintenance.yaml takes the env-apply lock around its compose steps, as deploy already did. nginx: the 24 proxied locations that production and dev both carried now live once in nginx_routes.conf.template, rendered by the entrypoint on every boot path. The effective config is unchanged for both. Remove the root package.json and lockfile, which nothing referenced. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -21,17 +21,28 @@ 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.
|
||||
- name: Pull latest base images
|
||||
working-directory: /home/adamf/deploy/web_server
|
||||
env:
|
||||
DOCKER_API_VERSION: "1.41"
|
||||
run: docker compose pull
|
||||
run: flock env-apply/run/lock docker compose pull
|
||||
|
||||
- name: Rebuild and restart containers
|
||||
working-directory: /home/adamf/deploy/web_server
|
||||
env:
|
||||
DOCKER_API_VERSION: "1.41"
|
||||
run: docker compose up -d --build --remove-orphans
|
||||
run: flock env-apply/run/lock docker compose up -d --build --remove-orphans
|
||||
|
||||
- name: Prune unused Docker images
|
||||
run: docker image prune -af
|
||||
|
||||
Reference in New Issue
Block a user