fix bw-data volume not reused between docker tests, fix wrong bw-data volume path for autoconf tests, add let's encrypt to autoconf tests and fix temp env not generated for linux
This commit is contained in:
parent
bf22faddc6
commit
5e598e90c9
|
@ -101,9 +101,7 @@ function start() {
|
|||
if [ "$HTTPS_PORT" = "" ] ; then
|
||||
HTTPS_PORT="8443"
|
||||
fi
|
||||
if [ ! -f /var/tmp/bunkerweb/tmp.env ] ; then
|
||||
echo -ne "IS_LOADING=yes\nHTTP_PORT=${HTTP_PORT}\nHTTPS_PORT=${HTTPS_PORT}\nAPI_LISTEN_IP=127.0.0.1\nSERVER_NAME=\n" > /var/tmp/bunkerweb/tmp.env
|
||||
fi
|
||||
echo -ne "IS_LOADING=yes\nHTTP_PORT=${HTTP_PORT}\nHTTPS_PORT=${HTTPS_PORT}\nAPI_LISTEN_IP=127.0.0.1\nSERVER_NAME=\n" > /var/tmp/bunkerweb/tmp.env
|
||||
/usr/share/bunkerweb/gen/main.py --variables /var/tmp/bunkerweb/tmp.env --no-linux-reload
|
||||
if [ $? -ne 0 ] ; then
|
||||
log "SYSTEMCTL" "❌" "Error while generating config from /var/tmp/bunkerweb/tmp.env"
|
||||
|
|
|
@ -59,6 +59,9 @@ class AutoconfTest(Test):
|
|||
with open(compose, "r") as f :
|
||||
data = safe_load(f.read())
|
||||
data["services"]["bunkerweb"]["volumes"] = ["/tmp/www:/var/www/html"]
|
||||
if not "AUTO_LETS_ENCRYPT=yes" in data["services"]["bunkerweb"]["environment"] :
|
||||
data["services"]["bunkerweb"]["environment"].append("AUTO_LETS_ENCRYPT=yes")
|
||||
data["services"]["bunkerweb"]["environment"].append("USE_LETS_ENCRYPT_STAGING=yes")
|
||||
with open(compose, "w") as f :
|
||||
f.write(dump(data))
|
||||
proc = run(
|
||||
|
@ -138,6 +141,7 @@ class AutoconfTest(Test):
|
|||
)
|
||||
Test.replace_in_file(compose, r"\./bw\-data:/", "/tmp/bw-data:/")
|
||||
Test.replace_in_file(compose, r"\- bw_data:/", "- /tmp/bw-data:/")
|
||||
Test.replace_in_file(compose, r"\- bw\-data:/", "- /tmp/bw-data:/")
|
||||
for ex_domain, test_domain in self._domains.items():
|
||||
Test.replace_in_files(test, ex_domain, test_domain)
|
||||
Test.rename(test, ex_domain, test_domain)
|
||||
|
|
|
@ -57,6 +57,7 @@ class DockerTest(Test):
|
|||
)
|
||||
Test.replace_in_file(compose, r"\./bw\-data:/", "/tmp/bw-data:/")
|
||||
Test.replace_in_file(compose, r"\- bw_data:/", "- /tmp/bw-data:/")
|
||||
Test.replace_in_file(compose, r"\- bw\-data:/", "- /tmp/bw-data:/")
|
||||
Test.replace_in_file(
|
||||
compose,
|
||||
r"AUTO_LETS_ENCRYPT=yes",
|
||||
|
|
Loading…
Reference in New Issue