Install the Cockpit Add-on Module
The Cockpit Add-on Module is repsonisble for sending blueprints to the cockpit, who then will deploy the products ordered via the WHMCS site.
Before you continue, make sure you have set-up the Cockpit.
First clone the 0-complexity/whmcs-cockpit-module repository from GitHub on to your local machine.
It will come with following two deployment scripts in the src
directory:
deploy.sh
#!/usr/bin/env bash # First argument of this script should be the password of the cloudscalers user on the machine hosting the docker WHMCS container set -euf rootpassword=$1 tar -cvzf cockpit.tgz whmcs scp -P 2222 cockpit.tgz [email protected]:/tmp/ scp -P 2222 docker-deploy-yves.sh [email protected]:/tmp/docker-deploy.sh ssh -p 2222 -t [email protected] "echo $rootpassword | sudo -S -i bash /tmp/docker-deploy.sh" rm -f cockpit.tgz
docker-deploy.sh
#!/usr/bin/env bash set -euf cd /tmp rm -rf whmcs html tar -xvf cockpit.tgz mv whmcs html mv html/templates/itsyouonline html/templates/fusion docker cp html whmcs:/var/www/ rm -rf html cockpit.tgz docker-deploy-yves.sh
Make sure to change the IP addresses in the first script so it deploys to your WHMCS environment.
Lookup the password of the cloudscalers user of the virtual machine hosting the WHMCS Docker container, and use it execute deploy.sh
:
bash deploy.sh <cloudscalers_password>
Next
Next you will want to configure the products.