fix deploy: targeted compose restart, Gitea login_name, WP DB token
Some checks are pending
ci/woodpecker/push/deploy Pipeline is running
ci/woodpecker/push/infra-ci Pipeline was successful
coverage 99% coverage
ci/woodpecker/push/ci Pipeline was successful

- docker compose up -d with explicit service names instead of
  --remove-orphans (avoids rootless Docker network detachment bug)
- GiteaClient.change_admin_password: add required login_name and
  source_id fields (was returning 422)
- provision_woodpecker: read WP API token from woodpecker DB hash
  (Woodpecker API uses its own tokens, not Gitea tokens)
- Pin fhirworx/rustfs and fhirworx/postgresql to :latest (not built
  by pipeline, COMMIT_SHA tag doesn't exist)
This commit is contained in:
kert
2026-03-23 11:41:01 -04:00
parent 8f1e7c8d13
commit 70688c8b9c

View File

@@ -187,10 +187,25 @@ def deploy(
# Set COMMIT_SHA for compose image tags # Set COMMIT_SHA for compose image tags
_set_env_var(env_path, "COMMIT_SHA", f"sha-{commit_sha[:8]}") _set_env_var(env_path, "COMMIT_SHA", f"sha-{commit_sha[:8]}")
# Restart services # Restart only services whose images or env changed.
# Avoid --remove-orphans which recreates containers and breaks
# network attachments on rootless Docker.
restart_services = [
"notebooks",
"zotero",
"docs",
"api",
"mc",
"gitea",
"woodpecker-server",
"woodpecker-agent",
"nessie",
"polaris",
"grafana",
]
try: try:
subprocess.run( subprocess.run(
["docker", "compose", "up", "-d", "--remove-orphans"], ["docker", "compose", "up", "-d", *restart_services],
cwd=str(cwd), cwd=str(cwd),
check=True, check=True,
capture_output=True, capture_output=True,
@@ -227,7 +242,7 @@ def deploy(
shutil.copy2(env_bak, env_path) shutil.copy2(env_bak, env_path)
try: try:
subprocess.run( subprocess.run(
["docker", "compose", "up", "-d", "--remove-orphans"], ["docker", "compose", "up", "-d", *restart_services],
cwd=str(cwd), cwd=str(cwd),
check=True, check=True,
capture_output=True, capture_output=True,