static: remove old container last (zero-downtime cutover)
This commit is contained in:
parent
d549c2405f
commit
a549aee2f1
1 changed files with 4 additions and 1 deletions
|
|
@ -137,7 +137,6 @@ runs:
|
|||
|
||||
case "$DT" in
|
||||
static)
|
||||
docker rm -f "$SLUG" >/dev/null 2>&1 || true # in case it was previously a container deploy
|
||||
echo "::group::build (bun)"
|
||||
BH="build-${SLUG}-${SHA}"
|
||||
docker rm -f "$BH" >/dev/null 2>&1 || true
|
||||
|
|
@ -163,6 +162,10 @@ runs:
|
|||
echo "::endgroup::"
|
||||
|
||||
write_fragment "$(printf '%s {\n\troot * /srv/sites/%s\n\tfile_server\n\ttry_files {path} /index.html\n}\n' "$SITE_ADDR" "$DOMAIN")"
|
||||
# Remove any prior container LAST — zero-downtime: a pre-existing
|
||||
# container kept serving the domain (via its old fragment) all through
|
||||
# the build above, until the file_server fragment took over just now.
|
||||
docker rm -f "$SLUG" >/dev/null 2>&1 && echo " removed old container (switched to static)" || true
|
||||
;;
|
||||
|
||||
docker|docker-db)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue