Generating working default config in non-cd mode

Using the same approach as in cd mode, but do it only once when running
ctrld the first time, then the config will be re-used then.

While at it, also adding Dockerfile.debug for better troubleshooting
with alpine base image.
This commit is contained in:
Cuong Manh Le
2023-09-22 18:34:46 +07:00
committed by Cuong Manh Le
parent 82e44b01af
commit 13391fd469
6 changed files with 43 additions and 57 deletions
+2 -2
View File
@@ -78,8 +78,8 @@ func SetConfigNameWithPath(v *viper.Viper, name, configPath string) {
func InitConfig(v *viper.Viper, name string) {
v.SetDefault("listener", map[string]*ListenerConfig{
"0": {
IP: "127.0.0.1",
Port: 53,
IP: "",
Port: 0,
},
})
v.SetDefault("network", map[string]*NetworkConfig{