fix: trying to fix auto-pulls 26 !

This commit is contained in:
2026-02-27 06:10:43 +02:00
parent 97410230e1
commit fad6912627
4 changed files with 10 additions and 15 deletions

View File

@@ -42,13 +42,12 @@ async def deploy(request: Request):
logger.info("Auto-deploy triggered via Gitea webhook")
# Trigger the host-side systemd service which runs as the bellsystems user.
# This avoids running git/docker as root inside the container.
await asyncio.create_subprocess_shell(
"systemctl start bellsystems-deploy",
stdout=asyncio.subprocess.DEVNULL,
stderr=asyncio.subprocess.DEVNULL,
)
# Write a trigger file to the host-mounted project path.
# A host-side watcher service (bellsystems-deploy-watcher) polls for this
# file and runs deploy-host.sh as the bellsystems user when it appears.
trigger_path = f"{settings.deploy_project_path}/.deploy-trigger"
with open(trigger_path, "w") as f:
f.write("deploy\n")
logger.info("Auto-deploy triggered via systemd")
logger.info("Auto-deploy trigger file written")
return {"ok": True, "message": "Deploy started"}