Skip to content

Commit

Permalink
fix(container): [PLAT-1050] load configs from alt path
Browse files Browse the repository at this point in the history
- Update the Arena entrypoint to load the config (index.json) path from
the ARENA_CONFIG_FILE environemnt variable,  If not defined it should
default to the standard location (/opt/arena/index.json).
- This is using the latest released version of Arena (the default
config path is different from pre-3.x versions)
  • Loading branch information
jkirkham-ratehub committed Mar 16, 2021
1 parent 7ed0b72 commit 3e56be2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const Arena = require('bull-arena');

const ARENA_CONFIG_FILE = process.env.ARENA_CONFIG_FILE || './index.json'

let config;
try {
config = require('./index.json');
config = require(ARENA_CONFIG_FILE);
} catch (err) {
if (err.code !== 'MODULE_NOT_FOUND') {
throw err;
Expand Down

0 comments on commit 3e56be2

Please sign in to comment.