Skip to content

Commit 94ee579

Browse files
authored
Merge pull request #4 from XHyperDEVX/cto/feature-ui-timer-enhancements-and-readme-update
Enhance timer UI/logic, sleep handling, and container health checks
2 parents 38854b4 + 2d4ce99 commit 94ee579

8 files changed

Lines changed: 1262 additions & 944 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ ENV PORT=8080
2222
ENV STATE_PATH=/data/state.json
2323
ENV TZ=UTC
2424

25+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD ["/webhooktimer", "healthcheck"]
26+
2527
ENTRYPOINT ["/webhooktimer"]

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
A minimalistic timer for webhooks, designed specifically for N8N Webhooks.
44

55
## Features
6-
- Minimalistic Go-based daemon
7-
- SQLite persistence for configuration
8-
- Web-UI for managing timers
9-
- Support for Fixed and Random intervals
10-
- WebSocket for live countdown updates
11-
- Ultra-lightweight Docker Image (~26MB)
6+
- Minimalistic Go-based daemon with embedded web UI
7+
- JSON file persistence for entries and execution logs (`/data/state.json` by default)
8+
- Fixed and Random interval modes
9+
- Duration inputs for hours, minutes, and seconds (Fixed + Random min/max)
10+
- Per-entry enable/disable state toggle
11+
- Sleep window support with skip logging when a trigger happens during sleep mode
12+
- Live UI refresh/countdown updates every 0.5 seconds while the UI tab is visible
13+
- Per-entry execution history (last 15 messages)
14+
- Built-in health endpoints (`/healthz`) and container health check command
1215

1316
## ⚠️ AI GENERATED PROJECT ⚠️
1417

@@ -26,10 +29,19 @@ services:
2629
- "8080:8080"
2730
volumes:
2831
- ./data:/data
32+
environment:
33+
- TZ=UTC
34+
- STATE_PATH=/data/state.json
35+
healthcheck:
36+
test: ["CMD", "/webhooktimer", "healthcheck"]
37+
interval: 30s
38+
timeout: 5s
39+
retries: 3
40+
start_period: 10s
2941
restart: unless-stopped
3042
```
3143
3244
## Local Development
33-
1. Install Go 1.23+
45+
1. Install Go 1.22+
3446
2. `go run main.go`
3547
3. Access UI at `http://localhost:8080`

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ services:
88
- STATE_PATH=/data/state.json
99
volumes:
1010
- ./data:/data
11+
healthcheck:
12+
test: ["CMD", "/webhooktimer", "healthcheck"]
13+
interval: 30s
14+
timeout: 5s
15+
retries: 3
16+
start_period: 10s
1117
restart: unless-stopped

0 commit comments

Comments
 (0)