balena-wpe
balena-wpe copied to clipboard
Healthcheck is not workig
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.
Ping?
Ping