Hi, I’m very curious about the best practice to serve static files (e.g. robots.txt, favicon.ico, 404.html, etc) in a containered, cloud friendly way
-
What’s the intention behind having “public_file_serve.enabled” true by default when we create a new rails app? Is it intentionally set to true so that we use rails standalone without nginx or else? If it’s intended, can you let me know how it’s better than using nginx and how to handle ssl?
-
I also searched for uploading the entire /public to S3. I see serving “/public/assets” is pretty easier with “assets_host” config. We can basically upload precompiled assets to places like S3 and set “assets_host” to reference it. Then rails will generate asset links using s3 link. I’m wondering if there is an option do the same/similar fashion with the root level static files like robots.txt, favicon.ico, 404.html, etc.
I think I’m mostly confused by the purpose and set up. Rails create a new app with all initial setup/configs but is not clear how I’m supposed to deploy. I appreciate any help. Thank you