3

I am running Ruby on Rails server on a Raspberry Pi running Raspbian. I can start the production Rails server with this command rvmsudo rails server -b 0.0.0.0 -p 80 -e production. What is the best practice for running a production Ruby on Rails server on a Raspberry Pi with Raspbian? Ideally the solution would be resilient to reboots.

Gregology
  • 1,625
  • 2
  • 18
  • 32
  • What's the problem? I don't see a question so much as a survey. – Eric Nov 27 '16 at 20:54
  • I'm interested in best practices and to prevent "run `rails server`" answers, I wanted to demonstrate that I know how to start the server – Gregology Nov 27 '16 at 21:12

1 Answers1

5

You can add your command rvmsudo rails server -b 0.0.0.0 -p 80 -e production to the file /etc/rc.local using your favourite text editor or by using the command echo "rvmsudo rails server -b 0.0.0.0 -p 80 -e production" >> /etc/rc.local after this execute /etc/rc.local to reload the file if the server is not started :-)

BinaryDump
  • 477
  • 4
  • 7