Git deploy with EasyEngine

rtCamp provides us with a great tool to manage our WordPress website, stack Nginx, MySQL, WPCLI, and Redis. It’s super easy to manage, deploy WordPress, or a PHP website using EasyEngine CLI., Sometimes you need to deploy your new codebase to the server. I created a new script to help you deploy your project via Git. It’s easy to set up, check the document below.

TLDR;

Just run wget -qO eeGit bit.ly/ee-git && sudo bash eeGit and your server will installed EasyEngine and Git Deploy already there.


Instruction

Add command ee-git to your VPS, help you manage your website’s source code by git, forget FTP, SFTP, no thirdparty software needed, just Git and EasyEngine.

Install EE & Git Deploy

Install

For Linux, we have created an installer script that will install all the dependencies for you. We have tested this on Ubuntu 14.04, 16.04, 18.04 and Debian 8, Debian 10 ( Only EasyEngine supported system ).

wget -qO eeGit bit.ly/ee-git && sudo bash eeGit

Usage

Create a website with EasyEngine’s command

sudo ee site create example.com --type=wp

Create git deploy for example.com’s theme

ee-git example.com theme_name
After running this command, you will see the remote URL in the command line like

git@your_server_ip/example.com

And please add a new remote to your project like

git add remote deploy git@your_server_ip/example.com

And after that, try git push deploy main and see the result.

Enjoy! with some note bellow.

Note

You should create your website by ee command first after that run command ee-git to setup git deploy for your theme.

To deploy WordPress plugins you can also use this way to create git deploy, but you need to edit the /home/example.com/hooks/post-receive file to make sure your git checkout exact source code to the right folder.

You should also need to add your public SSH key to /home/git/.ssh/authorized_keys too.

Related posts

Leave the first comment