Skip to content

healthcheck never goes to heathly state #45

Description

@jeanmi151

For docker compose health check it is required to install curl inside the container.

Here is an example of my docker-compose.yml

  mviewer:
    image: mviewer/mviewer:v4.1
    healthcheck:
      test: ["CMD-SHELL", "curl -s -f http://localhost:80/ >/dev/null || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 10
    volumes:
      - ./volumes/mviewer-apps:/usr/share/nginx/html/apps
  mviewerstudio:
    image: mviewer/mviewerstudio:v4.3
    healthcheck:
      test: ["CMD-SHELL", "curl -s -f http://localhost:8000/mviewerstudio/index.html >/dev/null || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 10
    environment:
      - CONF_PATH_FROM_MVIEWER=apps/store
      - CONF_PUBLISH_PATH_FROM_MVIEWER=apps/public
      - DEFAULT_ORG=my_org
      - EXPORT_CONF_FOLDER=/home/mvuser/apps/store
      - MVIEWERSTUDIO_PUBLISH_PATH=/home/mvuser/apps/public
      - MVIEWERSTUDIO_URL_PATH_PREFIX=mviewerstudio
    volumes:
      - ./volumes/mviewer-apps:/home/mvuser/apps
      - ./resources/mviewer-studio/config.json:/home/mvuser/src/static/config.json

With this sample mviewerstudio never goes to healthy state because the curl command is missing.

Notes it is installed in mviewer/mviewer:v4.1 image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions