From ed16bdb30548719561a8c664a09d95535849c6e3 Mon Sep 17 00:00:00 2001 From: codarrior Date: Fri, 4 Jan 2019 17:13:04 +1100 Subject: [PATCH] Update deployment guide with helpful hint Deployment guide enhanced for helpful hint for production environment setup. --- docs/3.x.x/guides/deployment.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/3.x.x/guides/deployment.md b/docs/3.x.x/guides/deployment.md index 3c69f63588..eaf8a6da34 100644 --- a/docs/3.x.x/guides/deployment.md +++ b/docs/3.x.x/guides/deployment.md @@ -21,6 +21,22 @@ Update the `production` settings with the IP and domain name where the project w In case your database is not running on the same server, make sure that the environment of your production database (`./config/environments/production/database.json`) is set properly. +If you are passing a number of configuration item values via environment variables which is always encouraged for production environment to keep application stateless, checkout the section for [Dynamic Configuration](../configurations/configurations.md#dynamic-configurations). Here is a hint on how to do it for production, for the configuration mentioned above: + + **Path —** `./config/environments/production/server.json`. +```js +{ + "host": "${process.env.APP_HOST || '127.0.0.1'}" + "port": "${process.env.NODE_PORT || 1337}", + "autoReload": { + "enabled": false + }, + "admin": { + "path": "/dashboard" // We highly recommend to change the default `/admin` path for security reasons. + } +} +``` + **⚠️ If you changed the path to access to the administration, the step #2 is required.** #### #2 - Setup (optional)