Monorepo for Tangled tangled.org

knotmirror, nix: rename `DbPath` to `DbUrl`

Signed-off-by: Seongmin Lee <git@boltless.me>

boltless.me 6384f34a 02be1066

verified
+3 -4
+1 -1
knotmirror/config/config.go
··· 10 10 type Config struct { 11 11 PlcUrl string `env:"MIRROR_PLC_URL, default=https://plc.directory"` 12 12 TapUrl string `env:"MIRROR_TAP_URL, default=http://localhost:2480"` 13 - DbPath string `env:"MIRROR_DB_PATH, default=mirror.db"` 13 + DbUrl string `env:"MIRROR_DB_URL, required"` 14 14 KnotUseSSL bool `env:"MIRROR_KNOT_USE_SSL, default=false"` // use SSL for Knot when not scheme is not specified 15 15 KnotSSRF bool `env:"MIRROR_KNOT_SSRF, default=false"` 16 16 GitRepoBasePath string `env:"MIRROR_GIT_BASEPATH, default=repos"`
-1
knotmirror/db/db.go
··· 6 6 "fmt" 7 7 "time" 8 8 9 - _ "github.com/mattn/go-sqlite3" 10 9 _ "github.com/jackc/pgx/v5/stdlib" 11 10 ) 12 11
+1 -1
knotmirror/knotmirror.go
··· 31 31 32 32 logger.Debug("config loaded:", "config", cfg) 33 33 34 - db, err := db.Make(ctx, cfg.DbPath, 32) 34 + db, err := db.Make(ctx, cfg.DbUrl, 32) 35 35 if err != nil { 36 36 return fmt.Errorf("initializing db: %w", err) 37 37 }
+1 -1
nix/modules/knotmirror.nix
··· 103 103 "MIRROR_LISTEN=${cfg.listenAddr}" 104 104 "MIRROR_HOSTNAME=${cfg.hostname}" 105 105 "MIRROR_TAP_URL=http://localhost:2480" 106 - "MIRROR_DB_PATH=${cfg.dbUrl}" 106 + "MIRROR_DB_URL=${cfg.dbUrl}" 107 107 "MIRROR_GIT_BASEPATH=/var/lib/knotmirror/repos" 108 108 "MIRROR_KNOT_USE_SSL=true" 109 109 "MIRROR_KNOT_SSRF=true"