mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server/machine-learning): Configurable port (#1386)
* feat(server/machine-learning): Configurable port * feat(server/machine-learning): Address PR comments. * feat(server/machine-learning): Simplify Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
b7d34079d9
commit
9d337bf4dc
4 changed files with 18 additions and 5 deletions
|
|
@ -12,13 +12,17 @@ async function bootstrap() {
|
|||
logger: getLogLevels(),
|
||||
});
|
||||
|
||||
const listeningPort = Number(process.env.MACHINE_LEARNING_PORT) || 3002;
|
||||
|
||||
const redisIoAdapter = new RedisIoAdapter(app);
|
||||
await redisIoAdapter.connectToRedis();
|
||||
app.useWebSocketAdapter(redisIoAdapter);
|
||||
|
||||
await app.listen(3002, () => {
|
||||
await app.listen(listeningPort, () => {
|
||||
const envName = (process.env.NODE_ENV || 'development').toUpperCase();
|
||||
logger.log(`Running Immich Microservices in ${envName} environment - version ${SERVER_VERSION}`);
|
||||
logger.log(
|
||||
`Running Immich Microservices in ${envName} environment - version ${SERVER_VERSION} - Listening on port: ${listeningPort}`,
|
||||
);
|
||||
});
|
||||
}
|
||||
bootstrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue