diff --git a/frappe_manager/services_manager/services.py b/frappe_manager/services_manager/services.py index c35f9919..6ad9ba95 100644 --- a/frappe_manager/services_manager/services.py +++ b/frappe_manager/services_manager/services.py @@ -86,12 +86,17 @@ def init(self): self.compose_project = ComposeProject(compose_file_manager=compose_file_manager) self.proxy_manager: NginxProxyManager = NginxProxyManager('global-nginx-proxy', self.compose_project) + self.fm_headers_path: Path = self.proxy_manager.dirs.confd.host / 'fm_headers.conf' + self.set_frappe_headers_conf() + - template_path: Path = get_template_path('fm_headers.conf.tmpl') - template = Template(template_path.read_text()) - output = template.render(current_version=f'v{get_current_fm_version()}') - self.fm_headers_path.write_text(output) + def set_frappe_headers_conf(self): + if self.fm_headers_path.parent.exists(): + template_path: Path = get_template_path('fm_headers.conf.tmpl') + template = Template(template_path.read_text()) + output = template.render(current_version=f'v{get_current_fm_version()}') + self.fm_headers_path.write_text(output) def set_typer_context(self, ctx: typer.Context): """ @@ -191,6 +196,8 @@ def create(self, backup: bool = False, clean_install: bool = True): docker=self.compose_project.docker, ) + self.set_frappe_headers_conf() + self.compose_project.compose_file_manager.set_secret_file_path('db_password', str(db_password_path.absolute())) self.compose_project.compose_file_manager.set_secret_file_path( 'db_root_password', str(db_root_password_path.absolute()) diff --git a/pyproject.toml b/pyproject.toml index 85179180..1f2dc15d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "frappe-manager" -version = "0.13.1" +version = "0.13.2" license = "MIT" repository = "https://github.com/rtcamp/frappe-manager" description = "A CLI tool based on Docker Compose to easily manage Frappe based projects. As of now, only suitable for development in local machines running on Mac and Linux based OS."