notfalsedev / zero-downtime-deployment

Laravel zero downtime deployment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel zero downtime deployment

Quick guide

Copy the contents of this repo to the vhost root folder.
Edit deploy.sh and change the following:

GIT_REMOTE_URL = The url to your repo (ssh://github.com/awesome-project/repo.git)
BASE_DIR = The vhost root folder location (/home/laravel/domains/awesome-project.io)

Copy your .env to {root-folder}/shared/.
Copy the storage folder to {root-folder}/shared/.

Make sure the apache/nginx vhost folder is pointing to: {root-folder}/www/public

Running the deployment

Make a new tag in your repo to deploy, for example: v1.0.0
Than run the deployment:

./deplosh.sh v1.0.0

Rollback

If a release with a given tag already exists in the releases folder.
The deployment will be rolled back to the given tag.
In this case only the Laravel cache will be cleared.

Alternatives

Laravel Envoyer
https://envoyer.io/

Deployer
https://github.com/lorisleiva/laravel-deployer

About

Laravel zero downtime deployment

License:MIT License


Languages

Language:Shell 100.0%