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

Add health status check #58

Merged
merged 4 commits into from
Nov 18, 2023
Merged

Conversation

ThalesC
Copy link
Contributor

@ThalesC ThalesC commented Nov 16, 2023

First of all, I dumped Portainer as soon as I found out about Dockge, but I am missing the health status.

This pull request results in the following picture, where:

  • basic-server doesn't have a healthcheck
  • healthy-server has a healthcheck with a test set to be healthy
  • unhealthy-server has a healthcheck with a test set to be unhealthy

Screenshot 3

Compose used on example;

version: "3.3"
services:
  basic-server:
    image: nginx:alpine
  healthy-server:
    image: nginx:alpine
    healthcheck:
      test:
        - CMD
        - ls
        - /etc
      interval: 1s
      timeout: 1s
      retries: 0
      start_period: 1s
  unhealthy-server:
    image: nginx:alpine
    healthcheck:
      test:
        - CMD
        - ls
        - /nope
      interval: 1s
      timeout: 1s
      retries: 0
      start_period: 1s
networks: {}

Just an initial idea, happy to discuss!

Thales added 2 commits November 16, 2023 15:04
Check if Health has any value and save it to be displayed.
If Health is empty, continue as normal.
Check if status is either Running or Healthy to set span class to bg-primary,
and check if status is Unhealthy to set span class to bg-danger.
@louislam louislam added this to the 1.1.0 milestone Nov 17, 2023
@louislam louislam merged commit a488518 into louislam:master Nov 18, 2023
0 of 6 checks passed
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.

None yet

2 participants