Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

chore: Add Air hot-reload configuration

rcourtman6e22dad57f00
diff --git a/.air.toml b/.air.toml
new file mode 100644
index 0000000000..0c56449b44
--- /dev/null
+++ b/.air.toml
@@ -0,0 +1,47 @@
+# Air configuration for Pulse hot-reload
+# https://github.com/air-verse/air
+
+root = "."
+tmp_dir = "tmp"
+
+[build]
+# Build command - uses Pro build if available
+cmd = """
+if [ -d /opt/pulse-enterprise ] && [ "${HOT_DEV_USE_PRO:-true}" = "true" ]; then
+ cd /opt/pulse-enterprise && go build -buildvcs=false -o /opt/pulse/pulse ./cmd/pulse-enterprise
+else
+ go build -o pulse ./cmd/pulse
+fi
+"""
+# Binary to run
+bin = "./pulse"
+# Watch these directories
+include_dir = ["cmd", "internal", "pkg"]
+# Exclude these patterns
+exclude_dir = ["vendor", "node_modules", "tmp", "frontend-modern", ".git"]
+exclude_file = []
+exclude_regex = ["_test\\.go$", "\\.tmp$", "~$"]
+exclude_unchanged = true
+# File extensions to watch
+include_ext = ["go", "tpl", "tmpl", "html"]
+# Kill old process before starting new one
+kill_delay = "1s"
+# Send interrupt signal first, then kill after delay
+stop_on_error = false
+# Log output
+log = "build-errors.log"
+# Colorize output
+color_main = "yellow"
+color_watcher = "cyan"
+color_build = "green"
+color_runner = "magenta"
+
+[log]
+# Show log time
+time = false
+# Only show main logs
+main_only = false
+
+[misc]
+# Delete tmp directory on exit
+clean_on_exit = true