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} \