241 lines
8.8 KiB
HTML
241 lines
8.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
<meta http-equiv="Pragma" content="no-cache" />
|
|
<meta http-equiv="Expires" content="0" />
|
|
<title>Safebox - INSTALLER TOOL</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Switzer:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"/>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
|
|
<link rel="stylesheet" href="style.css?t=1" />
|
|
</head>
|
|
<body id="installer">
|
|
<div class="main" >
|
|
<div id="myAppsContainer">
|
|
<div class="logo">
|
|
<img src="/img/logo.svg" alt="Safebox"/>
|
|
<span>Safebox</span>
|
|
</div>
|
|
<h3 style="text-align:center">No any previous deployed environment has found</h3>
|
|
<div class="main-header">
|
|
<h1>Base settings</h1>
|
|
</div>
|
|
|
|
<form class="form-install" action="install.php" method="post">
|
|
<!-- base settings -->
|
|
<div class="input-row">
|
|
<label for="user_auth">User auth (homeguard) enable?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="USER_AUTH" id="user_auth">
|
|
<option value="yes">Yes</option>
|
|
<option value="no" selected>No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="div_user_auth" class="hidden">
|
|
<div class="input-row">
|
|
<label for="auth_username">Username:</label>
|
|
<div class="input-container">
|
|
<input type="text" class="form-control" name="AUTH_USERNAME" id="auth_username" value="" maxlength="20" size="20">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="auth_password">Password:</label>
|
|
<div class="input-container">
|
|
<input type="text" class="form-control" name="AUTH_PASSWORD" id="auth_password" value="" maxlength="20" size="20">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="auth_role">Role:</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="AUTH_ROLE" id="auth_role">
|
|
<option value="admin">Admin</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="vpn">Proxy enable?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="VPN_PROXY" id="vpn">
|
|
<option value="yes">Yes</option>
|
|
<option value="no" selected>No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="div_vpn" class="hidden">
|
|
<div class="input-row">
|
|
<label for="vpn_domain">Please add domain url to download the VPN hash from:</label>
|
|
<div class="input-container">
|
|
<input type="text" class="form-control" name="VPN_DOMAIN" id="vpn_domain" value="https://portal.safebox.network" placeholder="https://portal.safebox.network" size="40">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="vpn_pass">Please type in the generated VPN passkey (8 digits):</label>
|
|
<div class="input-container">
|
|
<input type="text" class="form-control" name="VPN_PASS" id="vpn_pass" value="" maxlength="8" size="10">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="letsencrypt_mail">Please add the letsencrypt mail address:</label>
|
|
<div class="input-container">
|
|
<input type="email" class="form-control" name="LETSENCRYPT_MAIL" id="letsencrypt_mail" value="">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="letsencrypt_servername">Please add letsencrypt server name (default is letsencrypt but you can add zerossl too):</label>
|
|
<div class="input-container">
|
|
<input type="text" class="form-control" name="LETSENCRYPT_SERVERNAME" id="letsencrypt_servername" value="letsencrypt" placeholder="letsencrypt">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="diagnostic">Diagnostic mode enable?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="DIAGNOSTIC" id="diagnostic">
|
|
<option value="yes">Yes</option>
|
|
<option value="no" selected>No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- base settings end -->
|
|
<br>
|
|
<br>
|
|
<div class="main-header">
|
|
<h1 id="advanced" style="cursor:pointer">Advanced settings</h1>
|
|
</div>
|
|
<!-- advanced settings -->
|
|
<div id="advanced_div" style="display:none">
|
|
<div class="input-row">
|
|
<label for="registry">Please fill in the docker registry name (default:safebox):</label>
|
|
<div class="input-container">
|
|
<input type="registry" class="form-control" name="DOCKER_REGISTRY_URL" id="registry" value="safebox" placeholder="safebox" required>
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="smarthost">Smarthost proxy?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="SMARTHOST_PROXY" id="smarthost">
|
|
<option value="yes" selected>Yes</option>
|
|
<option value="no">No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="div_smarthost">
|
|
<div class="input-row">
|
|
<label for="domain">Please fill in the domain name</label>
|
|
<div class="input-container">
|
|
<input type="domain" class="form-control" name="DOMAIN" id="domain" value="localhost">
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="local_backend">Would you like to run local backend?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="LOCAL_BACKEND" id="local_backend">
|
|
<option value="yes">Yes</option>
|
|
<option value="no" selected>No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="localproxy">Local proxy?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="LOCAL_PROXY" id="localproxy">
|
|
<option value="yes" selected>Yes</option>
|
|
<option value="no">No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="input-row">
|
|
<label for="cron">Cron?</label>
|
|
<div class="input-container">
|
|
<select class="custom-select d-block w-100" name="CRON" id="cron">
|
|
<option value="yes">Yes</option>
|
|
<option value="no">No</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- advanced settings end -->
|
|
<button class="save-button" type="submit">Start install</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Optional JavaScript -->
|
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
|
<script>
|
|
jQuery(document).ready(function(){
|
|
|
|
jQuery('#diagnostic').click(function() {
|
|
if (jQuery(this).val()=='yes') {
|
|
jQuery('#local_backend').val('yes');
|
|
}
|
|
else {
|
|
jQuery('#local_backend').val('no');
|
|
}
|
|
});
|
|
|
|
jQuery('#advanced').click(function() {
|
|
jQuery('#advanced_div').toggle();
|
|
});
|
|
|
|
jQuery('select#smarthost').change(function() {
|
|
if (jQuery(this).val()=='yes') jQuery('#div_smarthost').show();
|
|
else jQuery('#div_smarthost').hide();
|
|
|
|
if (jQuery("#smarthost").val()=='no' && jQuery("#localproxy").val()=='yes') {
|
|
alert("Warning! Local proxy will not work without smarthost proxy service.");
|
|
}
|
|
});
|
|
jQuery('select#user_auth').click(function() {
|
|
if (jQuery(this).val()=='yes') jQuery('#div_user_auth').show();
|
|
else jQuery('#div_user_auth').hide();
|
|
});
|
|
jQuery('select#vpn').click(function() {
|
|
if (jQuery(this).val()=='yes') jQuery('#div_vpn').show();
|
|
else jQuery('#div_vpn').hide();
|
|
});
|
|
jQuery('select#discovery').click(function() {
|
|
if (jQuery(this).val()=='yes') jQuery('#div_discover').show();
|
|
else jQuery('#div_discover').hide();
|
|
});
|
|
jQuery('select#additionals').click(function() {
|
|
if (jQuery(this).val()=='yes') jQuery('#div_additionals').show();
|
|
else jQuery('#div_additionals').hide();
|
|
});
|
|
jQuery('select#nextcloud').click(function() {
|
|
if (jQuery(this).val()=='Y') jQuery('#div_nextcloud').show();
|
|
else jQuery('#div_nextcloud').hide();
|
|
});
|
|
jQuery('select#bitwarden').click(function() {
|
|
if (jQuery(this).val()=='Y') jQuery('#div_bitwarden').show();
|
|
else jQuery('#div_bitwarden').hide();
|
|
});
|
|
jQuery('select#bitwarden_smtp').click(function() {
|
|
if (jQuery(this).val()=='3') jQuery('#div_bitwarden_smtp').show();
|
|
else jQuery('#div_bitwarden_smtp').hide();
|
|
});
|
|
jQuery('select#guacamole').click(function() {
|
|
if (jQuery(this).val()=='Y') jQuery('#div_guacamole').show();
|
|
else jQuery('#div_guacamole').hide();
|
|
});
|
|
jQuery('select#smtp_server').click(function() {
|
|
if (jQuery(this).val()=='Y') jQuery('#div_smtp_server').show();
|
|
else jQuery('#div_smtp_server').hide();
|
|
});
|
|
jQuery('select#roundcube').click(function() {
|
|
if (jQuery(this).val()=='Y') jQuery('#div_roundcube').show();
|
|
else jQuery('#div_roundcube').hide();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|