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

Allow custom Kaiserfile outside of project repo #32

Closed Resonious closed 4 years ago

Resonious commented 4 years ago

This is a super small change that lets me use a custom Kaiserfile in a standard path without incurring changes in my project repos.

I've customized my Kaiserfile and Dockerfile for hats a bit. Sometimes I feel like the changes are too specific to my workflow to be worth opening a hats PR, so I added this feature to Kaiser to avoid juggling unstaged changes whenever I commit to hats. Dunno if we want to merge it or not!

degicat commented 4 years ago

@davidsiaw please review this

davidsiaw commented 4 years ago

This seems good. Different people have different computers and thus different ways their dev environments need to be set up, often to override the prepackaged settings.

Could you please share with me what you customized specifically, so we can have a look at maybe possible new features for Kaiser? Its not going to preclude this PR, I think a general way to customize Kaiser right now is always good.

Also, please add a section in the README on how to use this feature, as well as gotchas, caveats etc.

Resonious commented 4 years ago

Sounds good. I'll add a README section.

My custom Kaiserfile just loads a different Dockerfile and attach_mounts just about every project file/folder. It sounded like the reason Kaiser only attached a few folders was because it gets slow on macOS, so I figured my change might not work well for everyone.

The custom Dockerfile is where most of the difference is. It uses the debian-based ruby image as a base because I find it has better set -o vi functionality. It also avoids bundle install and doesn't ADD as many files. That speeds up re-builds, especially when Gemfile changes.

https://gist.github.com/Resonious/b6314785c484079074d0309e51993120 https://gist.github.com/Resonious/95b3cc7b971f30210ebf8c420f63315c

Resonious commented 4 years ago

@davidsiaw just amended the README!

davidsiaw commented 4 years ago

Also, fyi @Resonious. I added this project to gitlab CI now so if you could just rebase to get the PR building too, that would be great.

davidsiaw commented 4 years ago

Wait, sorry I jumped the gun. Its not merged yet.

Resonious commented 4 years ago

@davidsiaw All up-to-date now