Skip to content
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

Merged
merged 3 commits into from
Mar 26, 2024
Merged

Local setup #231

merged 3 commits into from
Mar 26, 2024

Conversation

olimart
Copy link
Contributor

@olimart olimart commented Mar 23, 2024

I tweaked a bit the setup through Procfile.
Please see comments inline.

Dockerfile Outdated
Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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).

Copy link
Contributor

@krschacht krschacht left a 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.

@olimart olimart requested a review from krschacht March 25, 2024 12:39
bin/dev Outdated
if command -v overmind &> /dev/null; then
overmind start -f Procfile.dev "$@"
else
foreman start -f Procfile.dev "$@"
Copy link
Contributor

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?

Copy link
Contributor Author

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

@krschacht krschacht merged commit 026b450 into AllYourBot:main Mar 26, 2024
4 checks passed
@olimart olimart deleted the bin-dev branch March 26, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants