mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix: healthcheck if custom host is set (#13887)
This commit is contained in:
parent
6bfc20ef95
commit
3551407d95
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ import { ImmichWorker } from 'src/enum';
|
||||||
import { ConfigRepository } from 'src/repositories/config.repository';
|
import { ConfigRepository } from 'src/repositories/config.repository';
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
const { workers, port } = new ConfigRepository().getEnv();
|
const { host, workers, port } = new ConfigRepository().getEnv();
|
||||||
if (!workers.includes(ImmichWorker.API)) {
|
if (!workers.includes(ImmichWorker.API)) {
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ const main = async () => {
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeout = setTimeout(() => controller.abort(), 2000);
|
const timeout = setTimeout(() => controller.abort(), 2000);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://localhost:${port}/api/server/ping`, {
|
const response = await fetch(`http://${host || 'localhost'}:${port}/api/server/ping`, {
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue