fix: Fixed server install scripts
Server Deploy / deploy (push) Successful in 59s

This commit is contained in:
2026-07-22 12:59:05 +01:00
parent cbb66c63f6
commit 9ffae221ac
5 changed files with 62 additions and 26 deletions
+7
View File
@@ -19,6 +19,13 @@ func main() {
mongoURI := getEnv("MONGO_URI", "mongodb://localhost:27017")
dbName := getEnv("MONGO_DB", "vantage")
// Agents dial gRPC directly, so there is no sane default: falling back to the
// public web host would hand every new agent a config pointing at a port that
// does not speak gRPC. Fail loudly at boot instead of at install time.
if os.Getenv("GRPC_HOST") == "" {
log.Fatal("GRPC_HOST is required (host:port agents dial for gRPC)")
}
if err := db.Connect(mongoURI, dbName); err != nil {
log.Fatalf("failed to connect to MongoDB: %v", err)
}