diff --git a/server/app.py b/server/app.py index 3855e8a..110a72a 100644 --- a/server/app.py +++ b/server/app.py @@ -6,7 +6,7 @@ from flask import Flask, jsonify, request from flask_httpauth import HTTPTokenAuth -from deployer import Deployer, DeploymentConfig +from sarthi.deployer import Deployer, DeploymentConfig load_dotenv() diff --git a/server/deployer.py b/server/sarthi/deployer.py similarity index 97% rename from server/deployer.py rename to server/sarthi/deployer.py index cd89c66..b095158 100644 --- a/server/deployer.py +++ b/server/sarthi/deployer.py @@ -4,7 +4,7 @@ import subprocess import typing -from utils import ComposeHelper, DeploymentConfig, NginxHelper +from .utils import ComposeHelper, DeploymentConfig, NginxHelper logger = logging.getLogger(__name__) diff --git a/server/utils.py b/server/sarthi/utils.py similarity index 99% rename from server/utils.py rename to server/sarthi/utils.py index ef89db6..ec030fb 100644 --- a/server/utils.py +++ b/server/sarthi/utils.py @@ -252,6 +252,7 @@ def _test_nginx_config(self): def reload_nginx(self): self._test_nginx_config() subprocess.run( + ["docker", "exec", "sarthi_nginx", "nginx", "-s", "reload"], check=True, )