nginxconfig.io icon indicating copy to clipboard operation
nginxconfig.io copied to clipboard

Feature request: Ruby on Rails application (puma)

Open WaKeMaTTa opened this issue 6 years ago • 12 comments

Example: https://itnext.io/docker-rails-puma-nginx-postgres-999cd8866b18#d08e

WaKeMaTTa avatar Nov 21 '18 11:11 WaKeMaTTa

@WaKeMaTTa could you please help me what's the difference between a regular reverse proxy and a Ruby on Rails reverse proxy?

0xb4lint avatar Nov 22 '18 10:11 0xb4lint

@valentinxxx Ok. When I have time, I will put in this issue all the differences.

WaKeMaTTa avatar Nov 22 '18 11:11 WaKeMaTTa

looking at the example, the primary difference appears to be around serving static content directly from nginx and only going to the proxy for dynamic pages.

Trozz avatar Nov 22 '18 13:11 Trozz

The static pages are located in /public folder of the application.

WaKeMaTTa avatar Nov 22 '18 13:11 WaKeMaTTa

What about using Passenger https://www.phusionpassenger.com/docs/tutorials/deploy_to_production/deploying_your_app/oss/ownserver/ruby/nginx/#rails_configuring-nginx-and-passenger

dush avatar Mar 08 '19 11:03 dush

I second using passenger!

Either way, I'd love to see this tool with RoR setup. I've gotten pretty good at doing it manually (my way at least, no idea if it's correct) but this is a great tool.

DRBragg avatar Jul 26 '19 14:07 DRBragg

Rails uses Puma by default. I think this tool can support Puma first.

huseyin avatar Dec 14 '19 19:12 huseyin

Has there been any progress on this? Would love to see an addition of RoR w/Puma in the configurator.

colinrubbert avatar Sep 17 '21 17:09 colinrubbert

Did a bit of work to build a Rails configuration option on here that doesn't require Passenger. If anyone wants to take a peak at it to check things are good. The seem good in my environment.

Resources: My own production nginx configuration Tom Pave's nginx.conf: https://gist.github.com/tompave/8590031

I'll be adding a little bit more configuration down the line to disable some things for use in Azure + Active Storage blob configurations. There's some weird caching issues with it but not sure if it's been fixed so I left that specific configuration out.

colinrubbert avatar Sep 20 '21 20:09 colinrubbert

(marking this as assigned per the open PR)

MattIPv4 avatar Oct 04 '21 15:10 MattIPv4