Adding Healthcheck to compose.yml #342
Replies: 2 comments 1 reply
-
|
Starting with docker compose should not prevent the health check scripts from running. . . . . . I just double checked. My production server has been using a docker-compose.yaml for over a year and the health check script has always run. Am I missing something? Why do you think it's not running? Thanks, |
Beta Was this translation helpful? Give feedback.
-
|
Is there a way to check it is running for sure? When I used to start using a docker start command then the container when looked at in docker ps would say "starting for a period of around 10 minutes" then when the this changed to "healthy" then this was also around the time when I could log into the web interface. Using my composr.yml file the the container will say "healthy" after around 10 seconds but the web not available for a further 10 minutes. I assumed the healthcheck was checking this was available, but maybe I am wide of the mark then. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We have recently switched from using Docker start command to using docker-compose referencing a compose.yml file (see below for contents of file). Running the container in this method does not run the health check. what do I need to add to the yml file for docker-compose up -d to run a health check at start-up (using healthcheck.sh in the container?
compose.yml
name: openvas
services:
openvas:
ports:
- 8443:9392
environment:
- PASSWORD=SecurePassword22
- HTTPS=true
- GSA_ARGS="--ssl-private-key=
/certs/key.pem --ssl-certificate=/certs/cert.pem"volumes:
- openvas:/data
restart: always
container_name: openvas
image: immauss/openvas:latest
volumes:
openvas:
external: true
name: openvas
Beta Was this translation helpful? Give feedback.
All reactions