Roll out under .compose.lock and drop the Docker API pin
env-apply was removed from web_server, so its run/lock no longer exists and the roll-out step failed with "cannot open lock file". Take .compose.lock, which web_server's deploy and maintenance workflows hold. The DOCKER_API_VERSION=1.41 pin was for the Pi's Docker 20.10; the host now runs Docker 29. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -128,21 +128,19 @@ jobs:
|
|||||||
# sha, compose pulls and runs that tag, so this step changes
|
# sha, compose pulls and runs that tag, so this step changes
|
||||||
# nothing until the pin is removed.
|
# nothing until the pin is removed.
|
||||||
#
|
#
|
||||||
# flock takes the lock that web_server's deploy.yaml and
|
# flock takes .compose.lock, which web_server's deploy.yaml and
|
||||||
# env-apply/apply.py hold while they run compose, so this cannot
|
# maintenance.yaml hold while they run compose, so this cannot
|
||||||
# race a site deploy or an .env change from the admin panel.
|
# race a site deploy or the weekly rebuild.
|
||||||
#
|
#
|
||||||
# Then it waits for the image's HEALTHCHECK (process up, database
|
# Then it waits for the image's HEALTHCHECK (process up, database
|
||||||
# reachable). A tracker that will not start fails the run, which is
|
# reachable). A tracker that will not start fails the run, which is
|
||||||
# the signal to pin JOBS_IMAGE_TAG to the last good sha.
|
# the signal to pin JOBS_IMAGE_TAG to the last good sha.
|
||||||
- name: Roll the site onto the new image
|
- name: Roll the site onto the new image
|
||||||
working-directory: /home/adamf/deploy/web_server
|
working-directory: /home/adamf/deploy/web_server
|
||||||
env:
|
|
||||||
DOCKER_API_VERSION: "1.41"
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
flock env-apply/run/lock sh -c 'docker compose pull jobs && docker compose up -d --no-deps jobs'
|
flock .compose.lock sh -c 'docker compose pull jobs && docker compose up -d --no-deps jobs'
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 30); do
|
||||||
status=$(docker inspect -f '{{.State.Health.Status}}' jobs)
|
status=$(docker inspect -f '{{.State.Health.Status}}' jobs)
|
||||||
echo "jobs: $status"
|
echo "jobs: $status"
|
||||||
|
|||||||
Reference in New Issue
Block a user