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

Add app-specific services #60

Closed davidsiaw closed 4 years ago

davidsiaw commented 4 years ago

This PR will add the ability to define containers that your app specifically needs that will be started and shut down together with your environment.

You should be able to add this in your Kaiserfile

service 'redis'

and have the DNS meow-redis available to you, if your environment is named meow

You can also specify an image

service 'redis', image: 'redis/alpine'

This is all for now. Will add more features (define env vars, command and volumes) in another PR

How to test

  1. Check out https://github.com/degica/kaisertest
  2. cd services_test
  3. Change the path in the Gemfile to where you checked out Kaiser on your PC
  4. bundle install
  5. kaiser init services_test
  6. kaiser up -v
  7. Check that the container services_test-redis is running and not dead
  8. Check that the other db container services_test-db is also running. The services_test-app doesn't have to be running since theres nothing that was started in the first place.
degicat commented 4 years ago

@Resonious please review this

davidsiaw commented 4 years ago

@Resonious I cleaned stuff up, and deleted the Gemfile.lock too. Also I made it so the kaiserfile contents were named kaiserfile_contents