Disable BM sync in dev
This commit is contained in:
parent
ae36e7767a
commit
afa8f9e9f2
2 changed files with 6 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ services:
|
||||||
- JSON_PATH=/app/rptrs.json
|
- JSON_PATH=/app/rptrs.json
|
||||||
- BMRPTRS_PATH=/app/bmrptrs.json
|
- BMRPTRS_PATH=/app/bmrptrs.json
|
||||||
- LISTEN_ADDR=:8080
|
- LISTEN_ADDR=:8080
|
||||||
|
- BM_SYNC=true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
6
main.go
6
main.go
|
|
@ -26,7 +26,11 @@ func main() {
|
||||||
log.Fatalf("Failed to seed database: %v", err)
|
log.Fatalf("Failed to seed database: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
startBMDeviceSync(db)
|
if os.Getenv("BM_SYNC") == "true" {
|
||||||
|
startBMDeviceSync(db)
|
||||||
|
} else {
|
||||||
|
log.Println("BM device sync disabled (set BM_SYNC=true to enable)")
|
||||||
|
}
|
||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.HandleFunc("/api/repeaters", handleRepeaters(db))
|
mux.HandleFunc("/api/repeaters", handleRepeaters(db))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue