valentinocossar / trellis-database-uploads-migration

Ansible playbook for Trellis that manages database and uploads migration.
MIT License
94 stars 13 forks source link
ansible-playbooks trellis

🎩 trellis-database-uploads-migration

Ansible playbook for Trellis that manages database and uploads migration. Inspired by hamedb89/trellis-db-push-and-pull.

⚙️ Installation

  1. Download latest release
  2. Copy CHANGELOG-TRELLIS-DATABASE-UPLOADS-MIGRATION.md file into Trellis root folder (so you can always know the version of the tool you are using)
  3. Copy all *.yml files into Trellis root folder
  4. Copy all bin/*.sh files into Trellis bin folder
  5. Add database_backup/* to the end of the Bedrock .gitignore file
  6. Set alias for host files as mentioned below in the hosts configuration section

‼️ Important

🏄 Usage

📌 Tips

🛠 Hosts configuration

Development

[development]
development_host ansible_host=192.168.50.5 ansible_connection=ssh ansible_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes"

[web]
development_host ansible_host=192.168.50.5 ansible_connection=ssh ansible_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes"

Staging

[staging]
staging_host ansible_host=your_server_hostname

[web]
staging_host ansible_host=your_server_hostname

Production

[production]
production_host ansible_host=your_server_hostname

[web]
production_host ansible_host=your_server_hostname

🤝 Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request