brian7704 / OpenTAKServer

Yet another open source TAK Server for ATAK, iTAK, and WinTAK
GNU General Public License v3.0
41 stars 6 forks source link

Health Check Url #30

Closed nerdalertdk closed 3 weeks ago

nerdalertdk commented 2 months ago

Hi

I'm not the biggest python person. But i tried to add an url that have no auth so I can add healthcheck to the Docker setup I'm working on.

This also helps me "boot" the containers in the correct order.

docker ps --format "table {{.Names}}\t{{.Status}}"
NAMES           STATUS
opentakserver   Up 15 minutes
rabbitmq        Up 15 minutes (healthy)
nginx           Up 15 minutes (healthy)

As you see opentakserver is missing !


Added one to nginx also

server {

    listen 80;
    server_name _;

    location = /health {
        access_log off;
        add_header 'Content-Type' 'application/json';
        return 200 '{"status":"healthy"}';
    }

}
curl -k https://localhost/health
{"status":"healthy"}