Hi,
I’m missing a documentation, when i want to go into production. The documentation for the normal developing of an app is good, but when I want to go into production, I feel totally lost.
First thing, I didn’t know, what is the best way, to publish an app online, which provider I should use and how to setup the server.
The next thing was, that the configuration for the production environment is forcing SSL and I didn’t know anything about SSL. So I was getting a self-hosted server, was creating a ssl certificate but didn’t know, how to give it to Puma. When I was searching in the internet, how I can do it, somebody told on StackOverflow, that puma is not concepted for public use and instead you should use a reverse proxy like Nginx, which communicates with puma and do the ssl thing. So I had to learn what Nginx is, how the setup and to use it.
When I finally had everything setup, i wanted to start my server in production, but got errors.
I didn’t know, that I have to create the production database extra and that the normal db:create
is only creating the databases for the test
and development
environment. After that, I had the next error, that the application.css
file is missing and I didn’t understand what was happening, because i tested the production environment first, with a fresh ruby on rails app. I found something in StackOverflow, that you have to start manually the compiling of the assets files, so that the assets files are compiled to the public-folder with the command:
RAILS_ENV=production rails assets:precompile
So it would be very cool, if you would have a little help from the documentation, how to go into production.