omtxguziec
Nest js APP problem
HI all. I just deployed an docker image of NestJS app.
Looking into logs everythings looks fine, but for some reason the app is not available on public. I set in the main.ts
const port = process.env.APP_PORT || 3000;
loggerService.log(
Listening on port ${port}
);
await app.listen(port, '0.0.0.0');
and in logs i can see
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [MetricsService] Listening on port 80
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RoutesResolver] AppController {/api} (version: 1): +10ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RouterExplorer] Mapped {/api, GET} (version: 1) route +3ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RoutesResolver] AuthController {/api/auth} (version: 1): +0ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RouterExplorer] Mapped {/api/auth/log-in, POST} (version: 1) route +1ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RouterExplorer] Mapped {/api/auth/log-out, POST} (version: 1) route +1ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RouterExplorer] Mapped {/api/auth/is-logged-in, GET} (version: 1) route +0ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RoutesResolver] MetricsController {/api/metrics} (version: 1): +0ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [RouterExplorer] Mapped {/api/metrics, POST} (version: 1) route +1ms
[Nest] 7 - 02/22/2024, 9:58:29 AM LOG [NestApplication] Nest application successfully started +3ms
i added a healtcheck on endpoint
/api/v1
on local works fine but in build logs i see
Attempt #14 failed with service unavailable. Continuing to retry for 27s
1/1 replicas never became healthy!
Healthcheck failed!
any potential solution?6 replies