You don't need a deploying app.
Deploy your PHP app with a simple bash script.
Please see specific version for laravel here: https://github.com/atlza/noDeploy/
This script was tested to deploy a php App in a LAMP environment from a git repository and a tag version. It assumes that you have git, npm and composer installed and working.
You will need :
- git to retrieve your code from a repo
- npm to install dependencies and run webpack
- composer for php dependencies
- switch current user to deploy user
- ask for tag to deploy
- clone tag into destination directory
- install composer dependencies
- install npm dependencies
- move symlink from previous release to new one (no downtime)
Clone this repo in your ssh user home directory
Give current user permission to execute both deploy.sh and realDeploy.sh
We also give others users right to execute realDeploy.sh so user deploy can execute the file.
git clone https://github.com/atlza/noDeploy-php.git
This script use a deploy user, which also is member of your www-data group This user must have the rights to access your git repository, you can use a deploy key for this. In our case, this user is called deploy. You can change it in the deploy.sh script.
Copy the variables files
cp variables.example variables.prod
Fill the variables files with correct value. Mainly :
#where you app should be deployed
deployPath="/path/to/deploy"
#your git repository
gitPath="git@github.com:user/repo.git"
In your deploy path the directory structure must look like :
/path/
|-to/
|-deploy/
|-environment
|-releases
|-shared
Edit the user used to deploy in deploy scrip (must have write access to deploy path and be in apache groupe)
vim deploy.sh
in the file edit the line
ME="deploy"
Run the deploy script
./deploy.sh prod
or for staging
./deploy.sh recette
- Add feature to remove old releases from system.
- Fully manage staging environments and parameters
- Guillaume Le Roy Mu Studio
This project is licensed under the MIT License - see the LICENSE.md file for details