hmn/src/config/config.go.example

50 lines
1.3 KiB
Plaintext

package config
import (
"github.com/jackc/pgx/v4"
"github.com/rs/zerolog"
)
var Config = HMNConfig{
Env: Dev,
Addr: ":9001",
PrivateAddr: ":9002",
BaseUrl: "http://handmade.local:9001",
LogLevel: zerolog.TraceLevel,
Postgres: PostgresConfig{
User: "hmn",
Password: "password",
Hostname: "handmade.local",
Port: 5432,
DbName: "hmn",
LogLevel: pgx.LogLevelTrace,
MinConn: 2, // Keep these low for dev, high for production
MaxConn: 2,
},
Auth: AuthConfig{
CookieDomain: ".handmade.local",
CookieSecure: false,
},
Email: EmailConfig{
ServerAddress: "smtp.example.com",
ServerPort: 587,
FromAddress: "noreply@example.com",
FromAddressPassword: "",
FromName: "Handmade Network Team",
OverrideRecipientEmail: "override@handmade.network", // NOTE(asaf): If this is not empty, all emails will be redirected to this address.
},
DigitalOcean: DigitalOceanConfig{
AssetsSpacesKey: "",
AssetsSpacesSecret: "",
AssetsSpacesRegion: "",
AssetsSpacesEndpoint: "",
AssetsSpacesBucket: "",
AssetsPathPrefix: "",
AssetsPublicUrlRoot: "",
},
EpisodeGuide: EpisodeGuide{
CineraOutputPath: "./annotations/",
Projects: map[string]string{"hero": "code", "riscy": "riscy", "bitwise": "bitwise"},
},
}