RotherOSS / otobo-docker

OTOBO Docker and Docker Compose files.
GNU General Public License v3.0
32 stars 16 forks source link

Healthchecks for OTOBO docker image #12

Closed StefanRother-OTOBO closed 2 years ago

StefanRother-OTOBO commented 4 years ago

Hi,

I think it's a good idea to define some health checks for our Otobo docker image. Example:

https://effective-docker.github.io/docker-healthchecks/

Another idea is to define the checks in our docker-compose file, that's, possible too!

Thanks,

Stefan

bschmalhofer commented 4 years ago

Yes, that's a good idea.

wornet-aer commented 3 years ago

Is anyone working on this yet? If not, I could offer implementing healthchecks using docker-compose and prepare a PR then.

StefanRother-OTOBO commented 3 years ago

Hi warnet-aer,

perfekt, thanks, you are welcome!

Thanks for your help!

Stefan

bschmalhofer commented 3 years ago

Health checks have been added, thaks to @wornet-aer . Let's keep this issue oben for a while, making sure that there are no adverse effects.

bschmalhofer commented 3 years ago

This looks good:

bes:~/devel/OTOBO/otobo-docker (rel-10_0)$ docker-compose ps Name Command State Ports

otobo_daemon_1 /opt/otobo_install/entrypo ... Up (healthy)
otobo_db_1 docker-entrypoint.sh --max ... Up (healthy) 3306/tcp
otobo_elastic_1 /bin/tini -- /usr/local/bi ... Up (healthy) 9200/tcp, 9300/tcp
otobo_localstack_1 docker-entrypoint.sh Up 0.0.0.0:4566->4566/tcp,:::4566->4566/tcp, 0.0.0.0:4571->4571/tcp,:::4571->4571/tcp,
5678/tcp, 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp
otobo_nginx_1 /docker-entrypoint.sh ngin ... Up 80/tcp, 0.0.0.0:81->8080/tcp,:::81->8080/tcp, 0.0.0.0:443->8443/tcp,:::443->8443/tcp
otobo_redis_1 docker-entrypoint.sh redis ... Up (healthy) 6379/tcp
otobo_selenium-chrome_1 /opt/bin/entry_point.sh Up 4444/tcp, 0.0.0.0:5900->5900/tcp,:::5900->5900/tcp
otobo_web_1 /opt/otobo_install/entrypo ... Up (healthy)

Before setup was completed the daemon process was on 'unhealthy', which was correct as the Daemon only runs in Secure mode. Finishing setup and restarting the service daemon brought it up to healthy.

bschmalhofer commented 3 years ago

TODO:

wornet-aer commented 3 years ago

I'm only running OTOBO instances without nginx here, but I will try to add some nginx health checks using a dev environment this week.

bschmalhofer commented 3 years ago

Thanks a lot, Andreas. The PR is merged. I'll leave this issue open for a couple of days, in case there are problems.

bschmalhofer commented 2 years ago

Never followed up by actually closing the issue. Closing now.

bschmalhofer commented 1 year ago

The health check for the service web is currently:

     healthcheck:
        test: curl -s -f http://localhost:5000/robots.txt

But curl has many different exit codes and the health check expects either 0 or 1. So let's change the command to :+1: curl -s -f http://localhost:5000/health .

The route health has been added in https://github.com/RotherOSS/otobo/issues/1699.