Closed DavidLarsKetch closed 4 years ago
Behavior JS files are not being generated correctly; Dockerfile should be:
- RUN yarn install && ./bin/cli build -c ./behavior-config.yml -b + RUN yarn install && ./bin/cli behaviors -c ./behavior-config.yml -b
docker exec -it $MY_CONTAINER_ID ls dist/ confirms no files in the expected dir.
docker exec -it $MY_CONTAINER_ID ls dist/
Happy to open a PR, but didn't see any contribution guidelines.
Full log from docker run -p 3030:3030 webrecorder/behaviors:
docker run -p 3030:3030 webrecorder/behaviors
Starting behavior api server with configuration { host: '0.0.0.0', port: 3030, numLookupWorkers: 2, behaviorInfo: { behaviorDir: '/app/dist', mdataPath: '/app/dist/behaviorMetadata.js', build: false }, fastifyOpts: { trustProxy: true, maxParamLength: 5000000000000, logger: true, querystringParser: [Function: querystringParser] } } {"level":30,"time":1592863446875,"pid":1,"hostname":"a265fcac95ce","msg":"Server listening at http://0.0.0.0:3030","v":1} Behavior api server listening on http://0.0.0.0:3030 └── / ├── behavior (GET) └── info (GET) └── - ├── list (GET) └── all (GET) Lookup Worker starting with configuration { workerId: 0, behaviorInfo: { behaviorDir: '/app/dist', mdataPath: '/app/dist/behaviorMetadata.js', build: false } } Lookup worker 0 encountered an error Error: Cannot find module '/app/dist/behaviorMetadata.js' Require stack: - /app/api/lookupWorker.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15) at Function.Module._load (internal/modules/cjs/loader.js:618:27) at Module.require (internal/modules/cjs/loader.js:771:19) at require (internal/modules/cjs/helpers.js:68:18) at loadBehaviorMdata (/app/api/lookupWorker.js:78:22) at MessagePort.<anonymous> (/app/api/lookupWorker.js:229:3) at Object.onceWrapper (events.js:291:20) at MessagePort.emit (events.js:203:13) at MessagePort.onmessage (internal/worker/io.js:70:8) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/api/lookupWorker.js' ] } Lookup worker 0 exited with code 1 Lookup Worker starting with configuration { workerId: 1, behaviorInfo: { behaviorDir: '/app/dist', mdataPath: '/app/dist/behaviorMetadata.js', build: false } } Lookup worker 1 encountered an error Error: Cannot find module '/app/dist/behaviorMetadata.js' Require stack: - /app/api/lookupWorker.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15) at Function.Module._load (internal/modules/cjs/loader.js:618:27) at Module.require (internal/modules/cjs/loader.js:771:19) at require (internal/modules/cjs/helpers.js:68:18) at loadBehaviorMdata (/app/api/lookupWorker.js:78:22) at MessagePort.<anonymous> (/app/api/lookupWorker.js:229:3) at Object.onceWrapper (events.js:291:20) at MessagePort.emit (events.js:203:13) at MessagePort.onmessage (internal/worker/io.js:70:8) { code: 'MODULE_NOT_FOUND', requireStack: [ '/app/api/lookupWorker.js' ] } Lookup worker 1 exited with code 1
Behavior JS files are not being generated correctly; Dockerfile should be:
docker exec -it $MY_CONTAINER_ID ls dist/
confirms no files in the expected dir.Happy to open a PR, but didn't see any contribution guidelines.
Full log from
docker run -p 3030:3030 webrecorder/behaviors
: