This commit is contained in:
+9
-9
@@ -16,11 +16,11 @@ import (
|
||||
"github.com/mrhid6/vantage/sitesvc/internal/store"
|
||||
)
|
||||
|
||||
// sitesvc backs the public marketing site. It owns two jobs end to end:
|
||||
// emailing the contact form, and provisioning an organisation once its owner
|
||||
// has verified their email address. It shares MongoDB with the control plane —
|
||||
// that is how the new tenant becomes visible to the app — but shares no code
|
||||
// and no process with it.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func main() {
|
||||
|
||||
godotenv.Load()
|
||||
@@ -33,10 +33,10 @@ func main() {
|
||||
}
|
||||
log.Printf("connected to MongoDB (database %q)", store.DatabaseName())
|
||||
|
||||
// The unique indexes on users.email and orgs.slug are a security property,
|
||||
// not an optimisation, so a failure to build them is fatal rather than a
|
||||
// warning: provisioning tenants without them risks duplicate accounts and
|
||||
// ambiguous host-based org resolution.
|
||||
|
||||
|
||||
|
||||
|
||||
if err := store.EnsureIndexes(); err != nil {
|
||||
log.Fatalf("failed to ensure indexes: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user