mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 03:26:57 +00:00
Make it possible to actually use redis for caching through the config flags
This commit is contained in:
parent
c4181d1206
commit
e1a22d5f4c
5 changed files with 37 additions and 12 deletions
|
@ -6,6 +6,7 @@ type Config struct {
|
|||
Gitea GiteaConfig
|
||||
Database DatabaseConfig
|
||||
ACME ACMEConfig
|
||||
RedisURL string `default:""`
|
||||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
|
|
|
@ -54,6 +54,9 @@ func MergeConfig(ctx *cli.Context, config *Config) {
|
|||
mergeGiteaConfig(ctx, &config.Gitea)
|
||||
mergeDatabaseConfig(ctx, &config.Database)
|
||||
mergeACMEConfig(ctx, &config.ACME)
|
||||
if ctx.IsSet("redis-url") {
|
||||
config.RedisURL = ctx.String("redis-url")
|
||||
}
|
||||
}
|
||||
|
||||
func mergeServerConfig(ctx *cli.Context, config *ServerConfig) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue