Add Gitea webhook auto-deploy: webhook receiver plus server.js proxy route

This commit is contained in:
2026-05-24 23:54:55 +08:00
parent 48b7f481cc
commit d4b217f60f
6 changed files with 378 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
[Unit]
Description=Gitea Webhook Auto-Deploy Receiver for publish
After=network.target docker.service
Requires=docker.service
[Service]
Type=simple
User=root
WorkingDirectory=/vol1/1000/docker/publish
ExecStart=/usr/bin/python3 /vol1/1000/docker/publish/webhook_receiver.py \
--port 5000 \
--secret YOUR_SECRET_HERE \
--repo-path /vol1/1000/docker/publish \
--compose-cmd "cd /vol1/1000/docker/publish && git pull && npm install && npm run build && docker-compose -f docker-compose.yml up --build -d"
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target