Skip to content

A webhook watcher service for Boo's git repo. It is used for automated deployments

Notifications You must be signed in to change notification settings

VVIP-Kitchen/boo-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Webhook watcher service for automated deployments

A webhook watcher service for Boo's git repo. It is used for automated deployments

Prerequisites

  1. Make sure go is installed
  2. Installation steps here
  3. Place the deploy.sh file under /home/ifkash
  4. Make the deploy.sh executable by running chmod +x deploy.sh

Steps

  1. The current user for this is ifkash
  2. Place the webgook_server.go file under /home/ifkash
  3. Build the executable
go build -o webhook_server webhook_server.go
  1. Set up a systemd service to run the webhook server. Create a file /etc/systemd/system/webhook-server.service
[Unit]
Description=GitHub Webhook Server
After=network.target

[Service]
User=ifkash
WorkingDirectory=/home/ifkash
ExecStart=/home/ifkash/webhook_server
Restart=always

[Install]
WantedBy=multi-user.target
  1. Reload the systemd daemon and restart the service
sudo systemctl daemon-reload
sudo systemctl restart webhook-server

Setup GitHub Webhook

  1. Go to repo settings, navigate to webhooks
  2. Add/Edit a webhook
  3. Set the payload URL to http://GCP_VM_IP:5000/webhook
  4. Ensure the content type is set to application/json
  5. Select "Just the push event" for the trigger

Monitor logs

To monitor logs for the systemd service

sudo journalctl -u webhook-server -f

About

A webhook watcher service for Boo's git repo. It is used for automated deployments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published