mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 06:31:58 +00:00
parent
c468da589a
commit
7a755a089b
3 changed files with 8 additions and 5 deletions
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
|
@ -5,8 +5,8 @@
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"restart": true,
|
"restart": true,
|
||||||
"port": 9230,
|
"port": 9231,
|
||||||
"name": "Immich Server",
|
"name": "Immich API Server",
|
||||||
"remoteRoot": "/usr/src/app",
|
"remoteRoot": "/usr/src/app",
|
||||||
"localRoot": "${workspaceFolder}/server"
|
"localRoot": "${workspaceFolder}/server"
|
||||||
},
|
},
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "attach",
|
"request": "attach",
|
||||||
"restart": true,
|
"restart": true,
|
||||||
"port": 9231,
|
"port": 9230,
|
||||||
"name": "Immich Microservices",
|
"name": "Immich Workers",
|
||||||
"remoteRoot": "/usr/src/app",
|
"remoteRoot": "/usr/src/app",
|
||||||
"localRoot": "${workspaceFolder}/server"
|
"localRoot": "${workspaceFolder}/server"
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
- 9230:9230
|
- 9230:9230
|
||||||
|
- 9231:9231
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- database
|
- database
|
||||||
|
|
|
@ -18,7 +18,9 @@ async function bootstrapImmichAdmin() {
|
||||||
function bootstrapWorker(name: string) {
|
function bootstrapWorker(name: string) {
|
||||||
console.log(`Starting ${name} worker`);
|
console.log(`Starting ${name} worker`);
|
||||||
|
|
||||||
const worker = name === 'api' ? fork(`./dist/workers/${name}.js`) : new Worker(`./dist/workers/${name}.js`);
|
const execArgv = process.execArgv.map((arg) => (arg.startsWith('--inspect') ? '--inspect=0.0.0.0:9231' : arg));
|
||||||
|
const worker =
|
||||||
|
name === 'api' ? fork(`./dist/workers/${name}.js`, [], { execArgv }) : new Worker(`./dist/workers/${name}.js`);
|
||||||
|
|
||||||
worker.on('error', (error) => {
|
worker.on('error', (error) => {
|
||||||
console.error(`${name} worker error: ${error}`);
|
console.error(`${name} worker error: ${error}`);
|
||||||
|
|
Loading…
Reference in a new issue