-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local setup #231
Local setup #231
Conversation
Dockerfile
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My editor linted Dockerfile. Not sure if interested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these lint changes look good
Procfile.dev
Outdated
@@ -1,2 +1,3 @@ | |||
web: env RUBY_DEBUG_OPEN=true bin/rails server -p ${PORT:-3000} | |||
postgres: docker-compose up postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was missing to start up with bin/dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn’t seem right to me.
My mental mode has been: there are two methods of running this app, Procfile OR docker compose. Meaning, if you have docker installed and want to use docker compose, you just run “docker compose up” and everything starts: puma, postgres, and redis. But if you don’t want to install docker and you prefer to install postgres and redis through brew (or whatever means to get them installed directly on your dev machine) then you use the Procfile. So having the Procfile execute docker doesn’t seem right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right. Will revert.
I've been transitioning my local setup recently and I haven't found my ideal config yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aligned with the latest version of Rails but also added overmind
command if already installed. (overmind is a more modern approach to foreman but act similar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overmind addition looks good, that’s new to me. But see my comment about postgres and let me know what you think.
bin/dev
Outdated
if command -v overmind &> /dev/null; then | ||
overmind start -f Procfile.dev "$@" | ||
else | ||
foreman start -f Procfile.dev "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olimart In this conditional, it's possible the person doesn't have foreman either. Shall we keep the "gem install" block that you removed above but put it down here within this branch of the conditional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should indeed. I've added it back. thanks
I tweaked a bit the setup through Procfile.
Please see comments inline.