fix: trying to fix auto-pulls 26 !
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
systemctl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user