Skip to content

Instantly share code, notes, and snippets.

@heshanh
Last active December 17, 2019 01:36
Show Gist options
  • Save heshanh/2d206e29bb143cb90476dbe80b7d403c to your computer and use it in GitHub Desktop.
Save heshanh/2d206e29bb143cb90476dbe80b7d403c to your computer and use it in GitHub Desktop.
Codeship S/FTP deployment to Cpanel Server (not safe)
#THIS IS NOT A SAFE WAY TO DEPLOY AS FTP PASSWORD/USERBANE IS EXPOSED. USE THIS IF THERE IS NO OTHER WAY
#
#Deploys code to cpanel
sshpass -p 'PASSWORD' rsync --progress -avz -e "ssh" ~/clone/ FTPUSER@HOST/IP:/home/webroot
#
#runs compsoer on bedrock and sage
sshpass -p 'PASSWORD' "ssh" FTPUSER@HOST/IP "cd webroot && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install && cd /home/webroot/web/app/themes/theme-dir && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment