# App appAssetsPath="$appPath/assets" appDataPath="$appPath/data" hostName=$(hostname) hostIp="127.0.0.1" hostUuid=$(fileValueGetOrCreate "$appDataPath/$hostName.uuid" $(uuidgen)) hostSalt=$(filePasswordGetOrCreate "$appDataPath/$hostName.salt") basePath="/_data" domainsList="$appAssetsPath/domains.list" sftpAccessGroup="sftp-access" dnsResolver="@1.1.1.1" pigzThreads="4" rocketChatUrl="" # Logs logPath="$appDataPath/logs" logFile="$logPath/$appDate.log" # CPU/Memory profiles 4c/8c/16c/32c 16g/32g/64g/128g kubeCpuProfile="8c" kubeMemoryProfile="16g" # k3s k3sCmd="/usr/local/bin/k3s" k3sNamespace="sodew-dev" k3sReadyRetries=20 k3sReadySleep=4 # Redis redisKube="redis" redisSentinelKube="$redisKube-sentinel" redisYaml="$appDataPath/yaml/$redisKube.yaml" redisPath="$basePath/$redisKube" redisFileUsersAcl="users.acl" redisRootPass=$(filePasswordGetOrCreate "$appDataPath/$hostName.$redisKube") # MariaDB mariadbKube="mariadb" mariadbMasterKube="$mariadbKube-master" mariadbSlaveKube="$mariadbKube-slave" mariadbYaml="$appDataPath/yaml/$mariadbKube.yaml" mariadbMasterPath="$basePath/$mariadbKube/master" mariadbSlavePath="$basePath/$mariadbKube/slave" mariadbRootPass=$(filePasswordGetOrCreate "$appDataPath/$hostName.$mariadbKube") # OpenLiteSpeed olsKube="openlitespeed" olsYaml="$appDataPath/yaml/$olsKube.yaml" olsPath="$basePath/$olsKube" olsVhostsPath="$basePath/vhosts" olsPrivatePath="$olsPath/vhosts-private" olsPublicPath="$olsPath/vhosts-public" olsLogsPath="$olsPath/logs" olsAdminPath="$olsPath/admin" olsPhpIniPath="$olsPath/php-ini" olsConfigPath="$olsPath/config" olsConfigFile="$olsConfigPath/httpd_config.conf" olsVhostsConfigPath="$olsConfigPath/vhosts" olsPodVhostsPath="/var/www/vhosts" olsPodPrivatePath="/var/www/private" olsPodPublicPath="/var/www/public" olsAdminWhiteList=("0.0.0.0/0") olsAdminPass=$(filePasswordGetOrCreate "$appDataPath/$hostName.$olsKube") olsVhostMode="standalone" olsVhostFile="virtual.host.conf" olsVhostTemplate="v.template" olsQuotaBlockLimit=10485760 olsQuotaInodeLimit=100000 olsPhpList=(81 82 83 84 85) # Postfix postfixKube="postfix" postfixYaml="$appDataPath/yaml/$postfixKube.yaml" postfixPath="$basePath/$postfixKube" postfixConfigPath="$postfixPath/config" postfixDkimPath="$postfixPath/dkim" postfixTlsCrtFile="$appDataPath/$postfixKube/tls.crt" postfixTlsKeyFile="$appDataPath/$postfixKube/tls.key" postfixHost="mta.example.com" postfixPostmaster="postmaster@$postfixHost" postfixDefaultRealm="auth.mta" postfixDkimSelector="dkim" postfixDomainsFile="virtual_domains.maps" postfixAliasesFile="virtual_aliases.maps" postfixSendersFile="senders.maps" postfixIp="$hostIp" # Worker workerKube="worker" workerYaml="$appDataPath/yaml/$workerKube.yaml" workerPath="$basePath/$workerKube" workerAgentPath="$workerPath/agent" workerTasksPath="$workerPath/tasks" workerFilesPath="$appDataPath/$workerKube" workerName="$hostName" workerPool="" workerApiUrl="https://api.sodew.ai/api/tasks" workerApiGettingPause=30 workerApiSendingPause=15 # Metric metricKube="metric" metricYaml="$appDataPath/yaml/$metricKube.yaml" metricApiUrl="https://metric.api.sodew.ai/api/v1/write" metricPath="$basePath/$metricKube" metricPromPath="$metricPath/prom" metricVmagentPath="$metricPath/vmagent" # Diag diagKube="diag" diagDeep=0 diagSince="4h" diagOpcacheUrl="https://demo.133.vedos.cz/__opcache.php" diagApiUrl="https://api.sodew.ai/api/diag" diagFile="$appDataPath/$diagKube/${appDate}_$appTime.report" # Backups backupType="tar" backupFirstDir="_first" backupParallelJobs=1 backupDailyPath="$appDataPath/backup-daily" backupDailySuffix="" backupDailyKeep=3 backupArchivePath="$appDataPath/backup-archive" backupArchiveSuffix=".archive" backupArchiveInterval=30 # Storage # Default path to remote storage root for rSync / FTP / SSH storageType="rsync" storagePath="/$hostName" storageDailyKeep=10 storageArchiveKeep=3 # Storage rSync rsyncUri="username@wedos.net/path" rsyncPassFile="$appDataPath/$hostName.rsync" filePasswordGetOrCreate "$rsyncPassFile" >/dev/null rsyncPath="$storagePath" # Storage FTP ftpHost="wedos.net" ftpPort="21" ftpUser="user" ftpPass=$(filePasswordGetOrCreate "$appDataPath/$hostName.ftp") ftpPath="$storagePath" # Storage SSH sshHost="wedos.net" sshUser="user" sshKeyFile="/home/user/.ssh/ssh_key" sshPath="/_storage$storagePath" # List of tasks for CRON cronJobs=( "* * * * * /bin/bash $appPath/$appFile --script metric-kube" "0 * * * * /bin/bash $appPath/$appFile --script metric-sites" "*/5 * * * * /bin/bash $appPath/$appFile --script worker-observer" "20,40 * * * * /bin/bash $appPath/$appFile --script diag-report-ai-short" "5 * * * * /bin/bash $appPath/$appFile --script diag-report-ai-full" "0 * * * * /bin/bash $appPath/$appFile --script backup" "* * * * * /bin/bash $appPath/$appFile --script unigma" )