Skip to content

Commit 13c8212

Browse files
fix production deployment
1 parent f931326 commit 13c8212

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/deployer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ def run_waf(self):
585585
ports_waf = [80]
586586

587587
host_config_waf = client.api.create_host_config(
588-
binds=[f"{os.environ['NEBULA_LOGS_DIR']}/waf/nginx:/var/log/nginx"],
588+
binds=[f"{self.log_dir}/waf/nginx:/var/log/nginx"],
589589
privileged=True,
590590
port_bindings={80: self.waf_port},
591591
)
@@ -668,7 +668,7 @@ def run_waf(self):
668668

669669
host_config_promtail = client.api.create_host_config(
670670
binds=[
671-
f"{os.environ['NEBULA_LOGS_DIR']}/waf/nginx:/var/log/nginx",
671+
f"{self.log_dir}/waf/nginx:/var/log/nginx",
672672
],
673673
)
674674

@@ -699,7 +699,7 @@ def stop_waf():
699699

700700
@staticmethod
701701
def stop_all():
702-
logging.info("Closing NEBULA (exiting from components)... Please wait")
702+
print("Closing NEBULA (exiting from components)... Please wait")
703703
try:
704704
Deployer.stop_frontend()
705705
Deployer.stop_controller()
@@ -713,4 +713,6 @@ def stop_all():
713713
os.kill(pid, signal.SIGKILL)
714714
sys.exit(0)
715715
except Exception as e:
716-
logging.info(f"Nebula is closed with errors {e}")
716+
print(f"Nebula is closed with errors {e}")
717+
finally:
718+
sys.exit(0)

0 commit comments

Comments
 (0)