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

Health Check Url #30

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Health Check Url #30

merged 1 commit into from
Jun 11, 2024

Conversation

nerdalertdk
Copy link
Contributor

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"}

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.

Added one to nginx like so

```nginx
server {

    listen 80;
    server_name _;

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

}
```

```shell
curl -k https://localhost/health
{"status":"healthy"}
```
@brian7704 brian7704 merged commit 30224c2 into brian7704:master Jun 11, 2024
@nerdalertdk nerdalertdk deleted the patch-1 branch June 12, 2024 20:03
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

Successfully merging this pull request may close these issues.

2 participants