Deploy project to a production server
Check, that you have Ansible v2.9.x (or later) is installed1:
ansible --version # Outputs: ansible 2.9.x
Add a new host name with IP (or domain) address of your remote server to the Ansible inventory (usually, at
/etc/ansible/hosts file) on your local machine:
[my_server] 10.20.30.40 ansible_connection=ssh
Be sure, you're working with a SSH key correctly:
- Generate a new SSH key by command
ssh-keygenon your local machine.
- Add a public key part (with
*.pubextension) into a bottom of
~/.ssh/authorized_keysfile on your remote server.
- Save a private key part on your local machine (usually, at
Run the built-in
cgapp deploy2 command (from the root folder of your project):
cgapp deploy # OR cgapp deploy --use-config