summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2020-07-13 13:27:31 +0200
committerCorentin LABBE <clabbe@baylibre.com>2020-07-13 13:36:10 +0200
commitadf3a341befabd3860d90341dd51554fd81d2fbf (patch)
tree1b90554df520c8261cc1f28bdf4f9f9d461c6b0c
parent3fa641e74700acad323fe19f1eadb285aeb1dd66 (diff)
Persistent DB need /etc/lava-server to be kept.
Since the LAVA DB password is set in /etc/lava-server/, we need to keep it accross restart. So put /etc/lava-server on a volume. This will also permit to keep some live configuration like dispatcher IP.
-rwxr-xr-xlavalab-gen.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index fbe2df9..eec6614 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -159,8 +159,11 @@ def main():
if persistent_db:
pg_volume_name = "pgdata_" + name
dockcomp["services"][name]["volumes"].append(pg_volume_name + ":/var/lib/postgresql")
+ etc_volume_name = "lava_etc_" + name
+ dockcomp["services"][name]["volumes"].append(etc_volume_name + ":/etc/lava-server/")
dockcomp["services"][name]["volumes"].append("lava_job_output:/var/lib/lava-server/default/media/job-output/")
dockcomp["volumes"] = {}
+ dockcomp["volumes"][etc_volume_name] = {}
dockcomp["volumes"][pg_volume_name] = {}
dockcomp["volumes"]["lava_job_output"] = {}