Skip to content

Commit

Permalink
docs: update the configuration environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dduarte-odoogap committed Feb 6, 2022
1 parent c68b0d1 commit d9a2ca3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions docs/essentials/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -19,7 +19,6 @@ module.exports = {
odooBaseUrl,
graphqlBaseUrl
}

}
}
};
Expand All @@ -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=<redis_host>
export REDIS_PORT=<redis_port>
# export REDIS_PASSWORD=<redis_password>
```

0 comments on commit d9a2ca3

Please sign in to comment.