code: func applyConfig(ccf *GlobalCLIFlags, cfg *service.Config) error {
  	// load /etc/teleport.yaml and apply it's values:
  	fileConf, err := config.ReadConfigFile(ccf.ConfigFile)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  	// if configuration is passed as an environment variable,
  	// try to decode it and override the config file
  	if ccf.ConfigString != "" {
  		fileConf, err = config.ReadFromString(ccf.ConfigString)
  		if err != nil {
  			return trace.Wrap(err)
  		}
  	}
  	if err = config.ApplyFileConfig(fileConf, cfg); err != nil {
  		return trace.Wrap(err)
  	}
  	// --debug flag
  	if ccf.Debug {
  		cfg.Debug = ccf.Debug
  		utils.InitLogger(utils.LoggingForCLI, logrus.DebugLevel)
  		logrus.Debugf("DEBUG logging enabled")
  	}
  
  	// read a host UUID for this node
  	cfg.HostUUID, err = utils.ReadHostUUID(cfg.DataDir)
  	if err != nil {
  		utils.FatalError(err)
  	}
  	return nil
  }
docs: // applyConfig takes configuration values from the config file and applies
  // them to 'service.Config' object