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

Best practice for deploying Rails projects with Thruster #12

Open
hooopo opened this issue Mar 24, 2024 · 5 comments
Open

Best practice for deploying Rails projects with Thruster #12

hooopo opened this issue Mar 24, 2024 · 5 comments

Comments

@hooopo
Copy link

hooopo commented Mar 24, 2024

I read the README and found the descriptions to be very simple, leaving me with some questions. What are the best practices for deploying Rails projects with Thruster, just SSL_DOMAIN=example.com thrust rails server? How do we handle scaling and auto-restart issues, are there any examples to refer to?

@3v0k4
Copy link
Contributor

3v0k4 commented Mar 27, 2024

I know you are awaiting an answer from the maintainers, but I was passing by 🙂

Thruster works best when paired with containers like Docker. Since it wraps Puma, you can use it as the CMD.

If you dockerize your app, you can use any orcherstration tool to take care of scaling and similar concerns.

There's a milestone in the Rails repo set for v8 that covers part of your questions: rails/rails#50479

@hooopo
Copy link
Author

hooopo commented Mar 27, 2024

@3v0k4 thanks

@jmonteiro
Copy link

In the meantime, with Rails 7.1, you can use dockerfile-rails: on your Rails project just bundle add dockerfile-rails and then bin/rails g dockerfile --thruster.

@hooopo
Copy link
Author

hooopo commented Apr 13, 2024

@jmonteiro cool 🎉

@reesericci
Copy link

reesericci commented Jul 13, 2024

If you'd like an example for a Dockerfile thruster deployment, I used it in my app United - https://codeberg.org/reesericci/united. There's a custom startup script in bin/, setuid to allow for usage with systemd dynamic users (the install script contains the unit), and a couple changes to the Dockerfile. It also uses my fork of thruster for self-signed TLS.

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

No branches or pull requests

4 participants