fix: host directory mounts for editable config (/opt/fw/{name}/)
This commit is contained in:
parent
9d10516a63
commit
3d8b85d918
1 changed files with 5 additions and 1 deletions
|
|
@ -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} \
|
||||
|
|
|
|||
Loading…
Reference in a new issue