Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker healthcheck fails when IMMICH_HOST is set #13877

Closed
1 of 3 tasks
nicandris opened this issue Nov 2, 2024 · 0 comments · Fixed by #13887
Closed
1 of 3 tasks

Docker healthcheck fails when IMMICH_HOST is set #13877

nicandris opened this issue Nov 2, 2024 · 0 comments · Fixed by #13887

Comments

@nicandris
Copy link

The bug

When i set the env var IMMICH_HOST (in my scenario 172.10.10.X) the docker healthcheck fails, probably because it's trying to connect to localhost

const response = await fetch(`http://localhost:${port}/api/server/ping`, {

The OS that Immich Server is running on

Docker

Version of Immich Server

v1.119.1

Version of Immich Mobile App

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:release
    network_mode: "service:immich_redis"
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env

Your .env content

UPLOAD_LOCATION=/-----
DB_DATA_LOCATION=/docker/configs/immich/db
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
TZ=Europe/Amsterdam
IMMICH_LOG_LEVEL=warn
IMMICH_HOST=172.10.10.6
REDIS_HOSTNAME=127.0.0.1
DB_HOSTNAME=127.0.0.1

Reproduction steps

  1. Remove IMMICH_HOST or set it to 127.0.0.1
  2. it works
  3. Add IMMICH_HOST to a different ip (NOT 0.0.0.0)
  4. healthcheck fails

Relevant log output

TypeError: fetch failed at node:internal/deps/undici/undici:13185:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async main (/usr/src/app/dist/bin/healthcheck.js:14:26) { [cause]: Error: connect ECONNREFUSED 127.0.0.1:2283 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 2283 } }

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant