Skip to content

Commit

Permalink
don't report netbox services as unhealthy if they are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Nov 21, 2022
1 parent 3d50a52 commit 4cf2b81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docker-compose-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./netbox/postgres:/var/lib/postgresql/data:rw
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
test: [ "CMD-SHELL", "[[ $${NETBOX_POSTGRES_DISABLED} == 'true' ]] || pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 60s
timeout: 15s
retries: 3
Expand All @@ -947,7 +947,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./netbox/redis:/data
healthcheck:
test: ["CMD-SHELL", "pidof redis-server || exit 1" ]
test: ["CMD-SHELL", "[[ $${NETBOX_REDIS_DISABLED} == 'true' ]] || ( pidof redis-server || exit 1 )" ]
interval: 60s
timeout: 15s
retries: 3
Expand All @@ -973,7 +973,7 @@ services:
volumes:
- ./nginx/ca-trust:/var/local/ca-trust:ro
healthcheck:
test: ["CMD-SHELL", "pidof redis-server || exit 1" ]
test: ["CMD-SHELL", "[[ $${NETBOX_REDIS_DISABLED} == 'true' ]] || ( pidof redis-server || exit 1 )" ]
interval: 60s
timeout: 15s
retries: 3
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./netbox/postgres:/var/lib/postgresql/data:rw
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
test: [ "CMD-SHELL", "[[ $${NETBOX_POSTGRES_DISABLED} == 'true' ]] || pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 60s
timeout: 15s
retries: 3
Expand Down Expand Up @@ -1016,7 +1016,7 @@ services:
- ./nginx/ca-trust:/var/local/ca-trust:ro
- ./netbox/redis:/data
healthcheck:
test: ["CMD-SHELL", "pidof redis-server || exit 1" ]
test: ["CMD-SHELL", "[[ $${NETBOX_REDIS_DISABLED} == 'true' ]] || ( pidof redis-server || exit 1 )" ]
interval: 60s
timeout: 15s
retries: 3
Expand Down Expand Up @@ -1045,7 +1045,7 @@ services:
volumes:
- ./nginx/ca-trust:/var/local/ca-trust:ro
healthcheck:
test: ["CMD-SHELL", "pidof redis-server || exit 1" ]
test: ["CMD-SHELL", "[[ $${NETBOX_REDIS_DISABLED} == 'true' ]] || ( pidof redis-server || exit 1 )" ]
interval: 60s
timeout: 15s
retries: 3
Expand Down

0 comments on commit 4cf2b81

Please sign in to comment.