degica / kaiser

Commandline Gem that allows you to work with web apps better
https://tech.degica.com/kaiser/
MIT License
12 stars 1 forks source link

Database plugin #61

Closed davidsiaw closed 4 years ago

davidsiaw commented 4 years ago

Context

This PR adds the ability to include MySQL and Postgres easily into your Kaiserfile, making it easier to start on a project. The plugin does most of the heavy lifting demanded by the db command, while still letting the user write his own db command if he is using another database.

To use it you simply add

plugin :database

# and then make it so Kaiser starts a mysql database for your project
def_db :mysql

How to test

  1. Check out https://github.com/degica/kaisertest
  2. cd db_test
  3. Change the path in the Gemfile to where you checked out Kaiser on your PC
  4. bundle install
  5. kaiser init db_test
  6. kaiser up -v
  7. Check that the container db_test-db is upped and that you can kaiser db_save and kaiser db_load
degicat commented 4 years ago

@Iorin0225 please review this