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 authored and Cuong Manh Le committed 2023-09-22 18:34:46 +07:00
1 parent 82e44b01af
commit 13391fd469
6 files changed
+43 -57

No files matched your search

+1
View File
@@ -882,6 +882,7 @@ func readConfigFile(writeDefaultConfig bool) bool {
if err := v.Unmarshal(&cfg); err != nil {
mainLog.Load().Fatal().Msgf("failed to unmarshal default config: %v", err)
}
_ = updateListenerConfig()
if err := writeConfigFile(); err != nil {
mainLog.Load().Fatal().Msgf("failed to write default config file: %v", err)
} else {