Bump SolidTime VM resources; call setup_mariadb
Increase SolidTime defaults in ct/solidtime.sh (CPU from 2 to 4, RAM from 2048 to 4096) to provide more capacity by default. In install/matomo-install.sh, invoke setup_mariadb before creating the Matomo DB to ensure the MariaDB service is installed/configured prior to running MARIADB_DB_NAME/MARIADB_DB_USER setup.
This commit is contained in:
@@ -7,8 +7,8 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
|
|
||||||
APP="SolidTime"
|
APP="SolidTime"
|
||||||
var_tags="${var_tags:-time-tracking;productivity;business}"
|
var_tags="${var_tags:-time-tracking;productivity;business}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-4}"
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-4096}"
|
||||||
var_disk="${var_disk:-8}"
|
var_disk="${var_disk:-8}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ $STD apt install -y caddy
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
|
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULES="pdo_mysql,gd,mbstring,xml,curl,intl,zip,ldap" setup_php
|
||||||
|
setup_mariadb
|
||||||
MARIADB_DB_NAME="matomo" MARIADB_DB_USER="matomo" setup_mariadb_db
|
MARIADB_DB_NAME="matomo" MARIADB_DB_USER="matomo" setup_mariadb_db
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
|
fetch_and_deploy_gh_release "matomo" "matomo-org/matomo" "prebuild" "latest" "/opt/matomo" "matomo-*.zip"
|
||||||
|
|||||||
@@ -31,21 +31,35 @@ cp .env.example .env
|
|||||||
sed -i "s|^APP_ENV=.*|APP_ENV=production|" .env
|
sed -i "s|^APP_ENV=.*|APP_ENV=production|" .env
|
||||||
sed -i "s|^APP_DEBUG=.*|APP_DEBUG=false|" .env
|
sed -i "s|^APP_DEBUG=.*|APP_DEBUG=false|" .env
|
||||||
sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" .env
|
sed -i "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}|" .env
|
||||||
|
sed -i "s|^APP_ENABLE_REGISTRATION=.*|APP_ENABLE_REGISTRATION=true|" .env
|
||||||
sed -i "s|^DB_CONNECTION=.*|DB_CONNECTION=pgsql|" .env
|
sed -i "s|^DB_CONNECTION=.*|DB_CONNECTION=pgsql|" .env
|
||||||
sed -i "s|^DB_HOST=.*|DB_HOST=127.0.0.1|" .env
|
sed -i "s|^DB_HOST=.*|DB_HOST=127.0.0.1|" .env
|
||||||
sed -i "s|^DB_PORT=.*|DB_PORT=5432|" .env
|
sed -i "s|^DB_PORT=.*|DB_PORT=5432|" .env
|
||||||
sed -i "s|^DB_DATABASE=.*|DB_DATABASE=${PG_DB_NAME}|" .env
|
sed -i "s|^DB_DATABASE=.*|DB_DATABASE=${PG_DB_NAME}|" .env
|
||||||
sed -i "s|^DB_USERNAME=.*|DB_USERNAME=${PG_DB_USER}|" .env
|
sed -i "s|^DB_USERNAME=.*|DB_USERNAME=${PG_DB_USER}|" .env
|
||||||
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" .env
|
sed -i "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" .env
|
||||||
|
sed -i "s|^FILESYSTEM_DISK=.*|FILESYSTEM_DISK=local|" .env
|
||||||
|
sed -i "s|^PUBLIC_FILESYSTEM_DISK=.*|PUBLIC_FILESYSTEM_DISK=public|" .env
|
||||||
|
sed -i "s|^MAIL_MAILER=.*|MAIL_MAILER=log|" .env
|
||||||
$STD composer install --no-dev --optimize-autoloader
|
$STD composer install --no-dev --optimize-autoloader
|
||||||
$STD php artisan key:generate
|
php artisan self-host:generate-keys >/tmp/solidtime.keys 2>/dev/null
|
||||||
|
while IFS= read -r line; do
|
||||||
|
KEY="${line%%=*}"
|
||||||
|
[[ -z "$KEY" || "${KEY:0:1}" == "#" ]] && continue
|
||||||
|
sed -i "/^${KEY}=/d" .env
|
||||||
|
echo "$line" >>.env
|
||||||
|
done </tmp/solidtime.keys
|
||||||
|
rm -f /tmp/solidtime.keys
|
||||||
$STD npm install
|
$STD npm install
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
|
rm -rf node_modules
|
||||||
mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache
|
mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache
|
||||||
chown -R www-data:www-data /opt/solidtime
|
chown -R www-data:www-data /opt/solidtime
|
||||||
chmod -R 775 storage bootstrap/cache
|
chmod -R 775 storage bootstrap/cache
|
||||||
$STD php artisan storage:link
|
$STD php artisan storage:link
|
||||||
$STD php artisan migrate --force
|
$STD php artisan migrate --force
|
||||||
|
$STD php artisan passport:client --personal --name="API" -n
|
||||||
|
$STD php artisan optimize
|
||||||
msg_ok "Set up SolidTime"
|
msg_ok "Set up SolidTime"
|
||||||
|
|
||||||
msg_info "Configuring Caddy"
|
msg_info "Configuring Caddy"
|
||||||
|
|||||||
Reference in New Issue
Block a user