# 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" vhostsPath="$basePath/vhosts" domainsList="$appAssetsPath/domains.list" sftpAccessGroup="sftp-access" 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 openlitespeedKube="openlitespeed" openlitespeedYaml="$appDataPath/yaml/$openlitespeedKube.yaml" openlitespeedPath="$basePath/$openlitespeedKube" openlitespeedAdminPath="$openlitespeedPath/admin" openlitespeedPhpIniPath="$openlitespeedPath/php-ini" openlitespeedConfigPath="$openlitespeedPath/config" openlitespeedLogsPath="$openlitespeedPath/logs" openlitespeedVhostDataPath="$openlitespeedPath/vhost-data" openlitespeedVhostSharedPath="$openlitespeedPath/vhost-shared" openlitespeedVhostsPath="$openlitespeedConfigPath/vhosts" openlitespeedConfigFile="$openlitespeedConfigPath/httpd_config.conf" openlitespeedAdminWhiteList=("0.0.0.0/0") openlitespeedAdminPass=$(filePasswordGetOrCreate "$appDataPath/$hostName.$openlitespeedKube") openlitespeedQuotaBlockLimit=10485760 openlitespeedQuotaInodeLimit=100000 # 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" postfixResolver="@8.8.8.8" # 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 storagePath="/$hostName" storageType="rsync" storageDays=99 # 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" )