protected function writeConfigFile() {
		if(!$this->config()->get('allow_web_editing')) return;

		// Create a basic new environment config from a template
		if( !$this->envFileExists()
			&& $this->Filename
			&& $this->CreateEnvConfig
		) {
			$templateFile = $this->config()->template_file ?: BASE_PATH.'/deploynaut/environment.template';
			file_put_contents($this->getConfigFilename(), file_get_contents($templateFile));
		} else if($this->envFileExists() && $this->DeployConfig) {
			file_put_contents($this->getConfigFilename(), $this->DeployConfig);
		}
	}