Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ EOF
"PG_META_DB_USER=" + dbConfig.User,
fmt.Sprintf("PG_META_DB_PORT=%d", dbConfig.Port),
"PG_META_DB_PASSWORD=" + dbConfig.Password,
"CRYPTO_KEY=" + utils.Config.Studio.PgmetaCryptoKey,
},
Healthcheck: &container.HealthConfig{
Test: []string{"CMD-SHELL", `node --eval="fetch('http://127.0.0.1:8080/health').then((r) => {if (!r.ok) throw new Error(r.status)})"`},
Expand Down Expand Up @@ -1035,6 +1036,7 @@ EOF
"SUPABASE_SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey.Value,
"LOGFLARE_PRIVATE_ACCESS_TOKEN=" + utils.Config.Analytics.ApiKey,
"OPENAI_API_KEY=" + utils.Config.Studio.OpenaiApiKey.Value,
"PG_META_CRYPTO_KEY=" + utils.Config.Studio.PgmetaCryptoKey,
fmt.Sprintf("LOGFLARE_URL=http://%v:4000", utils.LogflareId),
fmt.Sprintf("NEXT_PUBLIC_ENABLE_LOGS=%v", utils.Config.Analytics.Enabled),
fmt.Sprintf("NEXT_ANALYTICS_BACKEND_PROVIDER=%v", utils.Config.Analytics.Backend),
Expand Down
18 changes: 10 additions & 8 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,13 @@ type (
}

studio struct {
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
Port uint16 `toml:"port"`
ApiUrl string `toml:"api_url"`
OpenaiApiKey Secret `toml:"openai_api_key"`
PgmetaImage string `toml:"-"`
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
Port uint16 `toml:"port"`
ApiUrl string `toml:"api_url"`
OpenaiApiKey Secret `toml:"openai_api_key"`
PgmetaImage string `toml:"-"`
PgmetaCryptoKey string `toml:"-"`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure PgmetaCryptoKey belongs here since PgmetaImage is already there, but was wondering if it's better to split the pgmeta stuff into its own struct.

}

inbucket struct {
Expand Down Expand Up @@ -385,8 +386,9 @@ func NewConfig(editors ...ConfigEditor) config {
SenderName: "Admin",
},
Studio: studio{
Image: Images.Studio,
PgmetaImage: Images.Pgmeta,
Image: Images.Studio,
PgmetaImage: Images.Pgmeta,
PgmetaCryptoKey: "SAMPLE_KEY",
},
Analytics: analytics{
Image: Images.Logflare,
Expand Down