2021-03-09 08:05:07 +00:00
|
|
|
package config
|
|
|
|
|
2021-07-05 18:34:51 +00:00
|
|
|
import (
|
|
|
|
"github.com/jackc/pgx/v4"
|
|
|
|
"github.com/rs/zerolog"
|
|
|
|
)
|
|
|
|
|
2021-03-09 08:05:07 +00:00
|
|
|
var Config = HMNConfig{
|
2021-07-05 18:34:51 +00:00
|
|
|
Env: Dev,
|
|
|
|
Addr: ":9001",
|
|
|
|
PrivateAddr: ":9002",
|
|
|
|
BaseUrl: "http://handmade.local:9001",
|
2021-08-29 23:11:41 +00:00
|
|
|
LogLevel: zerolog.TraceLevel, // InfoLevel is recommended for production
|
2021-03-09 08:05:07 +00:00
|
|
|
Postgres: PostgresConfig{
|
|
|
|
User: "hmn",
|
|
|
|
Password: "password",
|
|
|
|
Hostname: "handmade.local",
|
2021-08-28 21:33:15 +00:00
|
|
|
Port: 5432,
|
2021-03-09 08:05:07 +00:00
|
|
|
DbName: "hmn",
|
2021-08-29 23:11:41 +00:00
|
|
|
LogLevel: pgx.LogLevelTrace, // LogLevelWarn is recommended for production
|
2021-04-06 06:10:15 +00:00
|
|
|
MinConn: 2, // Keep these low for dev, high for production
|
2021-08-29 23:11:41 +00:00
|
|
|
MaxConn: 10,
|
2021-03-09 08:05:07 +00:00
|
|
|
},
|
2021-05-04 13:23:02 +00:00
|
|
|
Auth: AuthConfig{
|
|
|
|
CookieDomain: ".handmade.local",
|
|
|
|
CookieSecure: false,
|
|
|
|
},
|
2021-08-08 20:05:52 +00:00
|
|
|
Email: EmailConfig{
|
2021-08-29 23:11:41 +00:00
|
|
|
ServerAddress: "smtp.example.com",
|
|
|
|
ServerPort: 587,
|
|
|
|
FromAddress: "noreply@example.com",
|
|
|
|
FromAddressPassword: "",
|
|
|
|
FromName: "Handmade Network Team",
|
2021-08-17 05:22:41 +00:00
|
|
|
OverrideRecipientEmail: "override@handmade.network", // NOTE(asaf): If this is not empty, all emails will be redirected to this address.
|
2021-08-08 20:05:52 +00:00
|
|
|
},
|
2021-06-22 09:50:40 +00:00
|
|
|
DigitalOcean: DigitalOceanConfig{
|
2021-08-29 23:11:41 +00:00
|
|
|
AssetsSpacesKey: "",
|
|
|
|
AssetsSpacesSecret: "",
|
|
|
|
AssetsSpacesRegion: "",
|
2021-06-22 09:50:40 +00:00
|
|
|
AssetsSpacesEndpoint: "",
|
2021-08-29 23:11:41 +00:00
|
|
|
AssetsSpacesBucket: "",
|
|
|
|
AssetsPathPrefix: "",
|
|
|
|
AssetsPublicUrlRoot: "",
|
2021-06-22 09:50:40 +00:00
|
|
|
},
|
2021-08-28 10:40:13 +00:00
|
|
|
EpisodeGuide: EpisodeGuide{
|
|
|
|
CineraOutputPath: "./annotations/",
|
|
|
|
Projects: map[string]string{"hero": "code", "riscy": "riscy", "bitwise": "bitwise"},
|
|
|
|
},
|
2021-03-09 08:05:07 +00:00
|
|
|
}
|