File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- BETTER_STACK_URL =
1+ BETTER_STACK_URL = https://uptime.betterstack.com/api/v1/incoming-webhook/HYqP4eAdUr1q9WFQLdMvetUj
22CHECK_INTERVAL = 10
33CPU_LIMIT = 90
44MEMORY_LIMIT = 90
Original file line number Diff line number Diff line change 1+ BETTER_STACK_URL =
2+ CHECK_INTERVAL = 10
3+ CPU_LIMIT = 90
4+ MEMORY_LIMIT = 90
5+ DISK_LIMIT = 85
Original file line number Diff line number Diff line change 1+ .env
Original file line number Diff line number Diff line change @@ -2,32 +2,20 @@ FROM golang:1.21-alpine AS builder
22
33WORKDIR /app
44
5- # Install build dependencies
65RUN apk add --no-cache gcc musl-dev
76
8- # Copy go mod files
9- COPY go.mod go.sum ./
10-
11- # Download dependencies
12- RUN go mod download
13-
14- # Copy source code
157COPY . .
168
17- # Build the application
18- RUN CGO_ENABLED=1 GOOS=linux go build -a -o monitoring .
9+ RUN go mod download
1910
20- # Copy the monitoring binary to /usr/local/bin to make it available in PATH
21- COPY monitoring /usr/local/bin/monitoring
22- RUN chmod +x /usr/local/bin/monitoring
11+ RUN go build -o monitoring .
2312
24- # Final stage
25- FROM alpine:3.19
13+ FROM alpine:3.19 AS final
2614
2715WORKDIR /app
2816
29- # Install runtime dependencies
3017RUN apk add --no-cache ca-certificates
3118
32- # Copy binary from builder
33- COPY --from=builder /app/monitoring .
19+ COPY --from=builder /app/monitoring /usr/local/bin/monitoring
20+
21+ RUN chmod +x /usr/local/bin/monitoring
You can’t perform that action at this time.
0 commit comments