feat(docker): add configurable path for vecna.json

* set default config path to /config
* update docker-compose example for config usage
* modify config resolution to include /config directory
This commit is contained in:
2026-04-11 20:48:21 +02:00
parent 4009a54e39
commit 5c070e441e
4 changed files with 11 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ var rootCmd = &cobra.Command{
}
func init() {
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default: ./vecna.yaml)")
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", os.Getenv("VECNA_CONFIG"), "config file path (env: VECNA_CONFIG; default search: /config, $HOME, ./)")
rootCmd.PersistentFlags().StringVar(&logLevel, "log-level", "info", "log level: info | debug")
rootCmd.AddCommand(convertCmd)
rootCmd.AddCommand(serveCmd)