Add Gitea webhook auto-deploy: webhook receiver plus server.js proxy route
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user