From 3a583a906d17e17dc10463de0c7ea72a6a19c474 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 27 Aug 2025 10:10:08 +0200 Subject: [PATCH] garage --- install/alpine-garage-install.sh | 98 ++++++++++++++++++++++++++++++++ install/leantime-install.sh | 18 +++--- 2 files changed, 105 insertions(+), 11 deletions(-) create mode 100644 install/alpine-garage-install.sh diff --git a/install/alpine-garage-install.sh b/install/alpine-garage-install.sh new file mode 100644 index 00000000..126401d9 --- /dev/null +++ b/install/alpine-garage-install.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://garagehq.deuxfleurs.fr/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Preparing directories" +mkdir -p /var/lib/garage/meta /var/lib/garage/data /var/lib/garage/snapshots +msg_ok "Prepared directories" + +msg_info "Setup Garage packages" +$STD apk add --no-cache garage garage-openrc openssl +msg_ok "Setup Garage packages" + +# msg_info "Generating RPC secret" +# if [[ ! -s /etc/garage.rpc_secret ]]; then +# openssl rand -hex 32 | tr -d '\n' >/etc/garage.rpc_secret +# chmod 600 /etc/garage.rpc_secret +# fi +# msg_ok "Generated RPC secret" + +# msg_info "Generating tokens" +# if [[ ! -s /etc/garage.tokens.env ]]; then +# ADMIN_TOKEN="$(openssl rand -base64 32)" +# METRICS_TOKEN="$(openssl rand -base64 32)" +# cat >/etc/garage.tokens.env </etc/garage.toml <>~/"$APPLICATION".creds +} >>~/leantime.creds msg_ok "Set up Database" fetch_and_deploy_gh_release "leantime" "Leantime/leantime" "prebuild" "latest" "/opt/leantime" Leantime*.tar.gz -msg_info "Setup ${APPLICATION}" -APACHE_LOG_DIR=/var/log/apache2 +msg_info "Setup Leantime" chown -R www-data:www-data "/opt/leantime" chmod -R 750 "/opt/leantime" @@ -55,8 +54,8 @@ cat </etc/apache2/sites-enabled/000-default.conf Require all granted - ErrorLog ${APACHE_LOG_DIR}/error.log - CustomLog ${APACHE_LOG_DIR}/access.log combined + ErrorLog /var/log/apache2/error.log + CustomLog /var/log/apache2/access.log combined EOF @@ -67,13 +66,10 @@ sed -i -e "s|^LEAN_DB_DATABASE.*|LEAN_DB_DATABASE = '$DB_NAME'|" \ -e "s|^LEAN_SESSION_PASSWORD.*|LEAN_SESSION_PASSWORD = '$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)'|" \ "/opt/leantime/config/.env" -a2enmod -q proxy_fcgi setenvif rewrite -a2enconf -q "php8.4-fpm" - +$STD a2enmod -q proxy_fcgi setenvif rewrite +$STD a2enconf -q "php8.4-fpm" sed -i -e "s/^;extension.\(curl\|fileinfo\|gd\|intl\|ldap\|mbstring\|exif\|mysqli\|odbc\|openssl\|pdo_mysql\)/extension=\1/g" "/etc/php/8.4/apache2/php.ini" - systemctl restart apache2 - msg_ok "Setup ${APPLICATION}" motd_ssh