Development
This commit is contained in:
parent
62bdf63c2f
commit
abf05a60fb
1 changed files with 10 additions and 1 deletions
|
|
@ -248,11 +248,20 @@ def setup_docker_compose(reuse_config=False):
|
|||
f" Ensure the routlin-dash directory is at {COMPOSE_FILE.parent}")
|
||||
|
||||
if reuse_config:
|
||||
import time
|
||||
cache_bust = str(int(time.time()))
|
||||
print("\n Stopping existing container...")
|
||||
subprocess.run(["docker", "compose", "down"], cwd=COMPOSE_FILE.parent, check=False)
|
||||
print("\n Building dashboard image...")
|
||||
result = subprocess.run(
|
||||
["docker", "compose", "build", "--build-arg", f"CACHE_BUST={cache_bust}"],
|
||||
cwd=COMPOSE_FILE.parent, check=False
|
||||
)
|
||||
if result.returncode != 0:
|
||||
die("docker compose build failed. Check the output above.")
|
||||
print("\n Starting dashboard container...")
|
||||
result = subprocess.run(
|
||||
["docker", "compose", "up", "-d", "--build"],
|
||||
["docker", "compose", "up", "-d"],
|
||||
cwd=COMPOSE_FILE.parent, check=False
|
||||
)
|
||||
if result.returncode != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue