This guide will walk you trhough how to setup upgrade functionality on the CMS Admin interface.
Webhook helps to automate some tasks that otherwise need to be done manually. For example upgrading the CMS to a newer version.
The Webhook package needs to be installed on your server (NOT in a docker container)
Install the Webhook package for your OS as described here
If on Ubuntu or Debian, you can run:
sudo apt-get install webhook
From the root project directory (where you cloned this project) run:
sh webhook-config.shThis will create a new file webhook/hooks.yaml with the correct paths in place, using the webhook/hooks.yaml.sample file
We will use this file to run Webhook
Install supervisor to keep the webhook server running in the background.
sudo apt install supervisorCreate a webhook.conf file in /etc/supervisor/conf.d/
cd /etc/supervisor/conf.d
sudo nano webhook.confAdd the following inside the webhook.conf file
[program:webhook]
command=webhook -hooks /path_to_climweb_dir/webhook/hooks.yaml -verbose
autostart=true
autorestart=true
startretries=3
startsecs=0
Save the file.
After creating the configuration, tell supervisord to refresh its configuration and start the service:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl statusIf everything is ok, Webhook is now set and ready to be used.
You can now set the CMS_UPGRADE_HOOK_URL env variable to:
http://host.docker.internal:9000/hooks/cms-upgrade
Note this a special docker network url accessed only from inside the cms_web docker container.
Then rebubild and restart climweb with these commands
cd /path_to_climweb_dir/
make restart