diff --git a/dockerfile b/dockerfile index 3e786d6381..cf22e13af9 100644 --- a/dockerfile +++ b/dockerfile @@ -24,7 +24,7 @@ ENV CI=true RUN cp .env.test .env RUN cp src/config.example.ts src/config.ts -RUN yarn run build:esbuild +RUN yarn run build:tsc ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait RUN chmod +x /wait diff --git a/src/lib/workers/index.ts b/src/lib/workers/index.ts index f8c97b1278..5b9c6a25cc 100644 --- a/src/lib/workers/index.ts +++ b/src/lib/workers/index.ts @@ -46,17 +46,24 @@ const maxThreads = production ? 3 : 1; const dirName = __dirname.replace('src/lib', 'dist/lib'); +const finishWorkerPath = resolve(dirName, 'lib', 'workers', 'finish.worker.js'); +const killWorkerPath = resolve(dirName, 'lib', 'workers', 'kill.worker.js'); +const casketWorkerPath = resolve(dirName, 'lib', 'workers', 'casket.worker.js'); + const finishWorker = new Piscina({ - filename: resolve(dirName, 'finish.worker.js'), - maxThreads + filename: finishWorkerPath, + maxThreads, + workerData: { fullpath: finishWorkerPath } }); const killWorker = new Piscina({ - filename: resolve(dirName, 'kill.worker.js'), - maxThreads + filename: killWorkerPath, + maxThreads, + workerData: { fullpath: killWorkerPath } }); const casketWorker = new Piscina({ - filename: resolve(dirName, 'casket.worker.js'), - maxThreads + filename: casketWorkerPath, + maxThreads, + workerData: { fullpath: casketWorkerPath } }); export const Workers = {