From 3d8b85d918ccf7fa2b929e77c455d4028642b963 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 3 Aug 2026 16:58:52 +0000 Subject: [PATCH] fix: host directory mounts for editable config (/opt/fw/{name}/) --- sources/python/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/python/main.py b/sources/python/main.py index 162b5cf..2fbb331 100644 --- a/sources/python/main.py +++ b/sources/python/main.py @@ -54,6 +54,10 @@ def deploy_container(name, token, cloud, port, upstream_ip, upstream_port, label container = f"wallarm-{name}" run(f"docker rm -f {container} 2>/dev/null", timeout=10) + host_dir = f"{BASE}/{name}" + os.makedirs(f"{host_dir}/etc", exist_ok=True) + os.makedirs(f"{host_dir}/nginx", exist_ok=True) + # Run container monitoring_port = int(port) + 10 print(f"[{name}] Starting container on port {port}...") @@ -61,7 +65,7 @@ def deploy_container(name, token, cloud, port, upstream_ip, upstream_port, label --name {container} \ --restart unless-stopped \ -p {port}:{port} \ - -v wallarm-data-{name}:/opt/wallarm \ + -v {host_dir}/nginx:/etc/nginx -v {host_dir}/etc:/opt/wallarm/etc \ -p {monitoring_port}:{monitoring_port} \ -e WALLARM_API_TOKEN={token} \ -e WALLARM_API_HOST={api_host} \