env variables

This commit is contained in:
2024-06-28 10:12:34 +00:00
parent 4ff5cc2728
commit 55f6720fcc
2 changed files with 21 additions and 20 deletions

View File

@@ -15,7 +15,7 @@
<div class="row">
<div class="mb-3">
<label for="registry">Please fill in the docker registry name</label>
<label for="registry">Please fill in the docker registry name (default:registry.format.hu):</label>
<input type="registry" class="form-control" name="registry" id="registry" value="registry.format.hu" required>
<div class="invalid-feedback">
Please enter a valid registry url.

View File

@@ -1,43 +1,44 @@
<?php
DOCKER_REGISTRY_URL=$_POST["registry"];
putenv('DOCKER_REGISTRY_URL='.$_POST["registry"]);
if ($_POST["smarthost"]=="Y") {
SMARTHOST_PROXY="yes";
DOMAIN=$_POST["domain"];
putenv('SMARTHOST_PROXY=yes');
putenv('DOMAIN='.$_POST["domain"]);
}
else {
SMARTHOST_PROXY="no";
putenv('SMARTHOST_PROXY=no');
}
if ($_POST["smarthost"]=="Y") {
LOCAL_PROXY="yes";
putenv('LOCAL_PROXY=yes');
}
else {
LOCAL_PROXY="no";
putenv('LOCAL_PROXY=no');
}
if [ "$SMARTHOST_PROXY" == "no" ]; then
echo "Warning! Local proxy will not work without smarthost proxy service.";
fi;
// TODO - js warning
//if [ "$SMARTHOST_PROXY" == "no" ]; then
// echo "Warning! Local proxy will not work without smarthost proxy service.";
//fi;
if ($_POST["vpn"]=="Y") {
VPN_PROXY="yes";
putenv('VPN_PROXY=yes');
}
else {
VPN_PROXY="no";
putenv('VPN_PROXY=no');
}
putenv('VPN_DOMAIN='.$_POST["vpn_domain"]);
putenv('VPN_KEY='.$_POST["vpn_key"]);
VPN_DOMAIN=$_POST["vpn_domain"];
VPN_KEY=$_POST["vpn_key"];
LETSENCRYPT_MAIL=$_POST["letsencrypt_mail"];
LETSENCRYPT_SERVERNAME=$_POST["letsencrypt_servername"];
putenv('LETSENCRYPT_MAIL='.$_POST["letsencrypt_mail"]);
putenv('LETSENCRYPT_SERVERNAME='.$_POST["letsencrypt_servername"]);
CRON=$_POST["cron"];
DISCOVERY=$_POST["discovery"];
putenv('CRON='.$_POST["cron"]);
putenv('DISCOVERY='.$_POST["discovery"]);
ADDITIONAL=$_POST["additional"]
putenv('ADDITIONAL='.$_POST["additional"]);
?>