Skip to content

Update name of config var #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/chipserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ func newService(cfg *runtime.Config, log *slog.Logger) (*chip.Service, error) {
log.Info("db ok")
}

rt.RP, err = vkutil.NewPool(rt.Config.Redis)
rt.RP, err = vkutil.NewPool(rt.Config.Valkey)
if err != nil {
return nil, fmt.Errorf("error connecting to redis: %w", err)
return nil, fmt.Errorf("error connecting to valkey: %w", err)
} else {
log.Info("redis ok")
log.Info("valkey ok")
}

svc := chip.NewService(rt, courier.NewCourier(rt.Config))
Expand Down
4 changes: 2 additions & 2 deletions runtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Config struct {
SSL bool `help:"whether server is using SSL"`

DB string `validate:"url,startswith=postgres:" help:"URL for your Postgres database"`
Redis string `validate:"url,startswith=redis:" help:"URL for your Redis instance"`
Valkey string `validate:"url,startswith=valkey:" help:"URL for your Valkey instance"`
StorageURL string `validate:"url" help:"URL base for public storage, e.g. avatars"`
SentryDSN string ` help:"the DSN used for logging errors to Sentry"`

Expand All @@ -42,7 +42,7 @@ func NewDefaultConfig() *Config {
SSL: false,

DB: "postgres://temba:temba@localhost/temba?sslmode=disable&Timezone=UTC",
Redis: "redis://localhost:6379/5",
Valkey: "valkey://localhost:6379/5",
StorageURL: "http://localhost/media/",

AWSAccessKeyID: "",
Expand Down