From d9a2ca3bd810268a7bd5444392f4ab291d25dfbc Mon Sep 17 00:00:00 2001 From: Diogo Duarte Date: Sun, 6 Feb 2022 22:01:48 +0000 Subject: [PATCH] docs: update the configuration environment variables --- docs/essentials/configuration.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/essentials/configuration.md b/docs/essentials/configuration.md index 16f5f535..4d59daf3 100755 --- a/docs/essentials/configuration.md +++ b/docs/essentials/configuration.md @@ -8,7 +8,7 @@ Odoo use graphql and jsonrpc calls ```js // packages/theme/middleware.config.js -const odooBaseUrl = process.env.BASE_URL; +const odooBaseUrl = process.env.BACKEND_BASE_URL || process.env.BASE_URL || 'https://vsfdemo.labs.odoogap.com/'; const graphqlBaseUrl = `${odooBaseUrl}graphql/vsf`; module.exports = { @@ -19,7 +19,6 @@ module.exports = { odooBaseUrl, graphqlBaseUrl } - } } }; @@ -28,11 +27,22 @@ module.exports = { ## Environment -This environment variables must be configured in .env files (.env_production for build) +This environment variables must be used for deployment or used on a dot env file + +```bash + +# Base Url should target the Odoo server +export BASE_URL=https://vsf.odoo.com/ -``` js -//.env file on root of packages/theme +# Backend base url will point for a private address if required internal access +# don't need to pass it unless you need a private access to the endpints +# export BACKEND_BASE_URL=https://vsf.odoogap.com/ -BASE_URL=https://vsf.odoo.com/ +# Public path should be defined on production for CDN access +# export PUBLIC_PATH=https://xyz.cloudfront.cdn.com +# Redis server for cache +export REDIS_HOST= +export REDIS_PORT= +# export REDIS_PASSWORD= ``` \ No newline at end of file