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

Healthcheck is not workig #51

Open
idoodler opened this issue Jul 26, 2019 · 2 comments
Open

Healthcheck is not workig #51

idoodler opened this issue Jul 26, 2019 · 2 comments

Comments

@idoodler
Copy link

My project is based balena-wpe, it displays a website served from another service.
I added my webserver to the depends_on property, to ensure the webserver is up and running I utilized healthcheck. Yoiu can find my docker-composer.yml attached below.

version: '2.1'
services:
  Browser:
    restart: always
    build: ./balena-wpe
    privileged: true
    network_mode: host
    environment:
      INITSYSTE: on
      WPE_URL: http://localhost:90
    depends_on:
      - Webserver
    healthcheck:
      test: ["CMD", "wget", "-q", "-O", "/dev/null", "$WPE_URL"]
  Webserver:
    restart: always
    build: ./Webserver
    privileged: true
    network_mode: host

It works when I replace the healthcheck property with:

command: >
      /bin/bash -c "
        while ! wget -O /dev/null $WPE_URL > /dev/null;
        do
          echo 'Waiting for Webserver to be ready...';
          sleep 10;
          exit 1;
        done;
        echo 'Webserver up, starting the Browser now!';
        /wpe-init
      "

I can't see any error in the balena-cloud console.

@idoodler
Copy link
Author

Ping?

@idoodler
Copy link
Author

Ping

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

No branches or pull requests

1 participant