pig
pig copied to clipboard
Allow two pig.json files to reference each other without Maximum call stack size exceeded error
I ran into this issue when I had an API Server that I wanted to spin up with my App Server (and vice versa)
/app/pig.json
{
"include": {
"../api/pig.json": "api"
}
}
/api/pig.json
{
"include": {
"../app/pig.json": "app"
}
}
This will cause the error below
RangeError: Maximum call stack size exceeded
at fromJsonFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:25:59)
at Object.module.exports.fromFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:11:16)
at /usr/local/lib/node_modules/docker-pig/lib/config.js:49:38
at Function.forOwn (/usr/local/lib/node_modules/docker-pig/node_modules/lodash/dist/lodash.js:2106:15)
at resolveIncludes (/usr/local/lib/node_modules/docker-pig/lib/config.js:48:7)
at Object.module.exports.fromFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:18:12)
at /usr/local/lib/node_modules/docker-pig/lib/config.js:49:38
Btw, thanks for this. It's exactly what I needed! I may try to get involved in the project once I understand the context. I wouldn't mind making this change if you'd like.
Hi!
Sorry, I'm not maintaining pig actively at the moment. You should try using docker-compose or similar tool instead. pig has last been tested with docker 1.4.0 (or was it 1.5.0).
Ah, okay. Thanks. Was there a specific reason you stopped supporting it? It has some added features that Docker Compose doesn't yet have.