diff --git a/internal/start/start.go b/internal/start/start.go index f0fa76e75..671ccfcb8 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -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)})"`}, @@ -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), diff --git a/pkg/config/config.go b/pkg/config/config.go index d21f1847c..c926d83a1 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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:"-"` } inbucket struct { @@ -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,