Deploy command
$ ansible-playbook -i config/deploy/hosts config/deploy/deploy-dev.yml
Install Ansible and Ansistrano
$ ansible --version
ansible 2.1.1.0
Install Ansistrano playbooks
$ sudo ansible-galaxy install carlosbuenosvinos.ansistrano-deploy carlosbuenosvinos.ansistrano-rollback --ignore-errors
Add host-alias to ssh config.
$ cat ~/.ssh/config
# development server
Host development-server-ssh-alias
Hostname localhost
Port 22
User FIX_USER_NAME
ForwardAgent yes
# EOT development server
Then use only host-alias on the inventor hosts file
Steps for prepare deploy environment, just example paths.
-
Server must satisfy all requirements
-
Prepare folders and environment
$ mkdir -p /tmp/deploy/shared $ cp -r ./storage /tmp/deploy/shared $ cp ./.env.example /tmp/deploy/shared/.env
-
Create temporary current folder and
artisan
file$ mkdir -p /tmp/deploy/current/public $ touch /tmp/deploy/current/artisan
-
Add APP_ENV and APP_KEY
$ vim /tmp/deploy/shared/.env
Example
APP_ENV=production APP_KEY=base64:eBzXep0nTYQg4TBGgibKB98C0P9GHdBoolmsOzLNksg=