Skip to content

Commit 39159fe

Browse files
committed
fix: boot the Go backend cleanly under the installer compose
1 parent 107ca26 commit 39159fe

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

backend/modules.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ type modules struct {
7575

7676
func initModules(db *gorm.DB, cfg *config) *modules {
7777
if cfg.jwtSecret == "" {
78-
_ = catcher.Error("JWT_SECRET is not set — refusing to start", nil, nil)
79-
panic("JWT_SECRET is required")
78+
cfg.jwtSecret = cfg.internalKey
79+
}
80+
if cfg.jwtSecret == "" {
81+
_ = catcher.Error("JWT_SECRET (or INTERNAL_KEY) is not set — refusing to start", nil, nil)
82+
panic("JWT_SECRET or INTERNAL_KEY is required")
8083
}
8184
if cfg.encryptionKey == "" {
8285
_ = catcher.Error("ENCRYPTION_KEY is not set — refusing to start", nil, nil)

installer/docker/compose.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ func (c *Compose) Populate(conf *config.Config, stack *StackConfig) error {
234234
stack.DataSources + ":/etc/utmstack",
235235
conf.UpdatesFolder + ":/updates",
236236
utils.MakeDir(0777, conf.DataDir, "uploads") + ":/uploads",
237+
utils.MakeDir(0777, stack.EventsEngineWorkdir, "soar") + ":/workdir/soar",
238+
utils.MakeDir(0777, stack.EventsEngineWorkdir, "compliance") + ":/workdir/compliance",
239+
// Shared with the event-processor: the backend authors the rules and
240+
// pipeline (tenants/patterns/filters); the EP reads the same host dirs.
241+
utils.MakeDir(0777, stack.EventsEngineWorkdir, "rules") + ":/workdir/rules",
242+
utils.MakeDir(0777, stack.EventsEngineWorkdir, "pipeline") + ":/workdir/pipeline",
237243
},
238244
Logging: &dLogging,
239245
Deploy: &Deploy{

0 commit comments

Comments
 (0)