First of all you must configure SSH in your server
For use zero downtime deploys, you need to structure project folder in a different way:
* -- /var/www/turismo
|---------- current --> /var/www/turismo/releases/latestrelease
|---------- .env
|---------- releases
|---------- storage
Also you need to update the virtual host configuration to point to /var/www/turismo/current/public
Now add the new variables from .env.example
file to your .env
file
Now add an Envoy.blade.php
file on the project root folder, you can comment and uncomment sentences what do you need
1 You may update cron and supervisor configurations to point to
/var/www/turismo/current/
directory*
2 Optionally in any command you can specify the branch to use, for example:
envoy run deploy --branch=master
Having an empty project folder in the server, ej /var/www/turismo
you can run:
envoy run init
now ssh into the server and fill .env
file.
From your computer you can run deploys using this command:
envoy run deploy
If you need do some rollback use:
envoy run rollback
When executing the deploy
command, you will be asked for confirmation to run migrate
command. But also you can run this command manually:
envoy run migrate
You can rollback your migrations using:
envoy run migrate_rollback
Also you can check the migrations status running
envoy run migrate_status
You can reload the services that you define in the reload_services
task executing:
envoy run reload_services