diff --git a/ct/alpine.sh b/ct/alpine.sh index ea946a60e..51767cb01 100644 --- a/ct/alpine.sh +++ b/ct/alpine.sh @@ -7,9 +7,9 @@ source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxV APP="Alpine" var_tags="${var_tags:-os;alpine}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-512}" -var_disk="${var_disk:-1}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-5}" var_os="${var_os:-alpine}" var_version="${var_version:-3.22}" var_unprivileged="${var_unprivileged:-1}" diff --git a/ct/garage.sh b/ct/garage.sh new file mode 100644 index 000000000..f07efc473 --- /dev/null +++ b/ct/garage.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://garagehq.deuxfleurs.fr/ + +APP="Garage" +var_tags="${var_tags:-}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-8192}" +var_disk="${var_disk:-20}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!" +msg_custom "🚀" "${GN}" "${APP} setup has been successfully initialized!" diff --git a/install/alpine-install.sh b/install/alpine-install.sh index 4922f1641..c8c95c5e0 100644 --- a/install/alpine-install.sh +++ b/install/alpine-install.sh @@ -21,7 +21,6 @@ $STD apk add nano $STD apk add mc msg_ok "Installed Dependencies" -fetch_and_deploy_gh_release "redlib" "redlib-org/redlib" "prebuild" "latest" "/opt/redlib" "redlib-x86_64-unknown-linux-musl.tar.gz" motd_ssh customize diff --git a/install/garage-install.sh b/install/garage-install.sh new file mode 100644 index 000000000..06dc470e9 --- /dev/null +++ b/install/garage-install.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Test Suite for tools.func +# License: MIT +# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Purpose: Run comprehensive test suite for all setup_* functions from tools.func + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Setup Garage" +GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name') +curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/x86_64-unknown-linux-musl/garage" -o /usr/local/bin/garage +chmod +x /usr/local/bin/garage +mkdir -p /var/lib/garage/{data,meta,snapshots} +mkdir -p /etc/garage +RPC_SECRET=$(openssl rand -hex 32) +ADMIN_TOKEN=$(openssl rand -base64 32) +METRICS_TOKEN=$(openssl rand -base64 32) +{ + echo "Garage Tokens and Secrets" + echo "RPC Secret: $RPC_SECRET" + echo "Admin Token: $ADMIN_TOKEN" + echo "Metrics Token: $METRICS_TOKEN" +} >>~/garage.creds +cat </etc/garage.toml +metadata_dir = "/var/lib/garage/meta" +data_dir = "/var/lib/garage/data" +db_engine = "sqlite" +replication_factor = 1 + +rpc_bind_addr = "[::]:3901" +rpc_public_addr = "127.0.0.1:3901" +rpc_secret = "${RPC_SECRET}" + +[s3_api] +s3_region = "garage" +api_bind_addr = "[::]:3900" +root_domain = ".s3.garage.localhost" + +[s3_web] +bind_addr = "[::]:3902" +root_domain = ".web.garage.localhost" +index = "index.html" + +[k2v_api] +api_bind_addr = "[::]:3904" + +[admin] +api_bind_addr = "[::]:3903" +admin_token = "${ADMIN_TOKEN}" +metrics_token = "${METRICS_TOKEN}" +EOF +msg_ok "Set up Garage" + + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt -y autoremove +$STD apt -y autoclean +$STD apt -y clean +msg_ok "Cleaned"