Set sensible flags pour server

This commit is contained in:
Victor Lacasse-Beaudoin 2023-05-25 04:44:06 -04:00
parent 9e7a8b3e46
commit ef4e9f7050

View file

@ -94,11 +94,11 @@ func init() {
viper.BindPFlag("db.database", serverCmd.Flags().Lookup("db-database")) viper.BindPFlag("db.database", serverCmd.Flags().Lookup("db-database"))
// db.host // db.host
serverCmd.Flags().String("db-host", "", "Postgres host (config:'db.host')") serverCmd.Flags().String("db-host", "postgres", "Postgres host (config:'db.host')")
viper.BindPFlag("db.host", serverCmd.Flags().Lookup("db-host")) viper.BindPFlag("db.host", serverCmd.Flags().Lookup("db-host"))
// db.password // db.password
serverCmd.Flags().String("db-password", "", "Postgres password (config:'db.password')") serverCmd.Flags().String("db-password", "bottin", "Postgres password (config:'db.password')")
viper.BindPFlag("db.password", serverCmd.Flags().Lookup("db-password")) viper.BindPFlag("db.password", serverCmd.Flags().Lookup("db-password"))
// db.port // db.port
@ -106,6 +106,6 @@ func init() {
viper.BindPFlag("db.port", serverCmd.Flags().Lookup("db-port")) viper.BindPFlag("db.port", serverCmd.Flags().Lookup("db-port"))
// db.user // db.user
serverCmd.Flags().String("db-user", "", "Postgres user (config:'db.user')") serverCmd.Flags().String("db-user", "bottin", "Postgres user (config:'db.user')")
viper.BindPFlag("db.user", serverCmd.Flags().Lookup("db-user")) viper.BindPFlag("db.user", serverCmd.Flags().Lookup("db-user"))
} }