From e6ca7d8a687fce2dd6aa1ae47e56b246ad07b544 Mon Sep 17 00:00:00 2001 From: Csaky Date: Thu, 11 Jan 2024 16:56:54 -0800 Subject: [PATCH 1/2] update docs with default template cache dir --- app/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/README.md b/app/README.md index 9076cf7..eeee3fc 100644 --- a/app/README.md +++ b/app/README.md @@ -44,7 +44,7 @@ The following variables alter the behavior of Carbone and its caching behavior. | Config Var | Env Var | Default | Notes | | --- | --- | --- | --- | -| `cacheDir` | `CACHE_DIR` | `/tmp/carbone-files` | This is the root location to read/write files. Error will be thrown if directory does not exist and cannot be created. Will attempt to fall back to operating system temp file location. | +| `cacheDir` | `CACHE_DIR` | `/var/lib/file-cache/data` | This is the root location to read/write files. Error will be thrown if directory does not exist and cannot be created. Will attempt to fall back to operating system temp file location. | | `cacheSize` | `CACHE_SIZE` | `2GB` | The maximum size of the `cacheDir` directory. Oldest timestamped files will be cycled out to make room for new files. Uses the [bytes](https://www.npmjs.com/package/bytes) library for parsing values. | | `converterFactoryTimeout` | `CONVERTER_FACTORY_TIMEOUT` | `60000` | Maximum amount of time (in milliseconds) that Carbone will use to convert files before timing out. | | `formFieldName` | `UPLOAD_FIELD_NAME` | `template` | Field name for multipart form data upload when uploading templates via /template api. | From 744a37dd85734abf7d4ffd464632701d70a2105f Mon Sep 17 00:00:00 2001 From: Csaky Date: Thu, 11 Jan 2024 16:57:36 -0800 Subject: [PATCH 2/2] make keycloak serverUrl and realm config/env's optional --- app/src/components/keycloak.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/keycloak.js b/app/src/components/keycloak.js index 76e038a..d4b5283 100644 --- a/app/src/components/keycloak.js +++ b/app/src/components/keycloak.js @@ -6,10 +6,10 @@ module.exports = new Keycloak({}, { 'confidential-port': 0, clientId: config.has('keycloak.clientId') ? config.get('keycloak.clientId') : undefined, 'policy-enforcer': {}, - realm: config.get('keycloak.realm'), + realm: config.has('keycloak.realm') ? config.get('keycloak.realm') : undefined, realmPublicKey: config.has('keycloak.publicKey') ? config.get('keycloak.publicKey') : undefined, secret: config.has('keycloak.clientSecret') ? config.get('keycloak.clientSecret') : undefined, - serverUrl: config.get('keycloak.serverUrl'), + serverUrl: config.has('keycloak.serverUrl') ? config.get('keycloak.serverUrl') : undefined, 'ssl-required': 'external', 'use-resource-role-mappings': false, 'verify-token-audience': true