docs: seed and extra env var (#1465)

* docs: seed and extra env var

* fix: linting
This commit is contained in:
abelanger5
2025-04-01 08:55:49 -04:00
committed by GitHub
parent 9cdf05848f
commit ac167780ec
4 changed files with 20 additions and 3 deletions
+1 -1
View File
@@ -15,4 +15,4 @@ function DynamicLottie(props: DynamicLottieProps) {
}
// Using CommonJS export
export default DynamicLottie;
export default DynamicLottie;
@@ -57,3 +57,21 @@ sharedConfig:
```
This will set the environment variable `MY_ENV_VAR` to `"my-value"` for all backend services. These values will override any default environment settings for the services.
### Seeding Data
The `sharedConfig` object also allows you to seed the database with a default tenant and user. The following environment variables are used for seeding:
````yaml
The following environment variables are used to seed the database:
```yaml
seed:
defaultAdminEmail: "admin@example.com" # in exposed/production environments, change this to a valid email
defaultAdminPassword: "Admin123!!" # in exposed/production environments, change this to a secure password
env:
ADMIN_NAME: "Admin User"
DEFAULT_TENANT_NAME: "Default"
DEFAULT_TENANT_SLUG: "default"
DEFAULT_TENANT_ID: "707d0855-80ab-4e1f-a156-f1c4546cbf52"
````
-2
View File
@@ -2,8 +2,6 @@ module github.com/hatchet-dev/hatchet
go 1.23.0
toolchain go1.24.1
require (
github.com/Masterminds/semver/v3 v3.3.1
github.com/creasty/defaults v1.8.0
+1
View File
@@ -86,6 +86,7 @@ func BindAllEnv(v *viper.Viper) {
_ = v.BindEnv("seed.adminName", "ADMIN_NAME")
_ = v.BindEnv("seed.defaultTenantName", "DEFAULT_TENANT_NAME")
_ = v.BindEnv("seed.defaultTenantSlug", "DEFAULT_TENANT_SLUG")
_ = v.BindEnv("seed.defaultTenantId", "DEFAULT_TENANT_ID")
_ = v.BindEnv("seed.isDevelopment", "SEED_DEVELOPMENT")
_ = v.BindEnv("logger.level", "DATABASE_LOGGER_LEVEL")