Yogzzz
Yogzzz

Reputation: 2785

Rails webrick production port number

How can I permanently change my application port number in production?

I know I can specify the port number when starting the server rails s -p 3005, but was wondering how to change it so that I dont have to specifiy the port number everytime I start up the app.

Upvotes: 0

Views: 371

Answers (2)

Charles
Charles

Reputation: 11

This seems to answer your question even though the question references running in development. I tend to agree with modifying the config/boot.rb as per.

But, iltempo is correct that you should be using a different stack in production. I've had good luck with Passenger.

Upvotes: 0

iltempo
iltempo

Reputation: 16012

Don't use webrick in production.

It is only optimized for development purposes. Use something like thin, unicorn or passenger for example. You can find capistrano recipes to start or restart web servers when deploying the app.

Upvotes: 6

Related Questions