Skip to content

Commit cd8013c

Browse files
authored
Merge pull request #25 from coollabsio/fix-healthcheck-unknown-default
fix: default to unknown health status for containers without healthcheck
2 parents e976b0f + 0bc55ee commit cd8013c

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Sentinel Docker Build Script
4+
# Quick build script for building Docker images locally
5+
6+
set -e # Exit on error
7+
8+
# Default image name and tag
9+
IMAGE_NAME="${IMAGE_NAME:-sentinel}"
10+
TAG="${TAG:-local}"
11+
12+
echo "🐳 Building Docker image: ${IMAGE_NAME}:${TAG}"
13+
echo ""
14+
15+
# Build the Docker image
16+
docker build -t "${IMAGE_NAME}:${TAG}" .
17+
18+
echo ""
19+
echo "✅ Docker image built successfully!"
20+
echo ""
21+
echo "Image: ${IMAGE_NAME}:${TAG}"
22+
echo ""
23+
echo "To run:"
24+
echo " docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ${IMAGE_NAME}:${TAG}"
25+
echo ""
26+
echo "To customize image name/tag:"
27+
echo " IMAGE_NAME=myname TAG=v1.0 ./build.sh"

cmd/cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func HandleSignals(ctx context.Context) error {
4848

4949
func Execute() error {
5050
config := config.NewDefaultConfig()
51+
log.Printf("Sentinel v%s is starting...", config.Version)
5152
if _, err := os.Stat(".env"); os.IsNotExist(err) {
5253
log.Println("No .env file found, skipping load")
5354
} else {

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package config
22

3-
const Version = "0.0.15"
3+
const Version = "0.0.17"
44

55
type Config struct {
66
Version string

pkg/push/push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (p *Pusher) containerData() ([]types.Container, error) {
151151
continue
152152
}
153153

154-
healthStatus := "unhealthy"
154+
healthStatus := "unknown"
155155
// Check if State exists and is not nil before accessing Health
156156
if inspectData.State != nil && inspectData.State.Health != nil {
157157
healthStatus = inspectData.State.Health.Status

0 commit comments

Comments
 (0)