Compare commits
No commits in common. "ff1cb4e9842d8d981e643c5be77d7b97b7bd11ca" and "669dfa52cf8bbc35faa46bbfda0065eddaca4a97" have entirely different histories.
ff1cb4e984
...
669dfa52cf
73
ct/alpine-valkey.sh
Normal file
73
ct/alpine-valkey.sh
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
|
# Author: pshankinclarke (lazarillo)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://valkey.io/
|
||||||
|
|
||||||
|
APP="Alpine-Valkey"
|
||||||
|
var_tags="${var_tags:-alpine;database}"
|
||||||
|
var_cpu="${var_cpu:-1}"
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_os="${var_os:-alpine}"
|
||||||
|
var_version="${var_version:-3.22}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
if ! apk -e info newt >/dev/null 2>&1; then
|
||||||
|
apk add -q newt
|
||||||
|
fi
|
||||||
|
LXCIP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
while true; do
|
||||||
|
CHOICE=$(
|
||||||
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "Valkey Management" --menu "Select option" 11 58 3 \
|
||||||
|
"1" "Update Valkey" \
|
||||||
|
"2" "Allow 0.0.0.0 for listening" \
|
||||||
|
"3" "Allow only ${LXCIP} for listening" 3>&2 2>&1 1>&3
|
||||||
|
)
|
||||||
|
exit_status=$?
|
||||||
|
if [ $exit_status == 1 ]; then
|
||||||
|
clear
|
||||||
|
exit-script
|
||||||
|
fi
|
||||||
|
header_info
|
||||||
|
case $CHOICE in
|
||||||
|
1)
|
||||||
|
msg_info "Updating Valkey"
|
||||||
|
apk update && apk upgrade valkey
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Updated Valkey"
|
||||||
|
msg_ok "Updated successfully!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
msg_info "Setting Valkey to listen on all interfaces"
|
||||||
|
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Valkey now listens on all interfaces!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
msg_info "Setting Valkey to listen only on ${LXCIP}"
|
||||||
|
sed -i "s/^bind .*/bind ${LXCIP}/" /etc/valkey/valkey.conf
|
||||||
|
rc-service valkey restart
|
||||||
|
msg_ok "Valkey now listens only on ${LXCIP}!"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed successfully!\n"
|
||||||
|
echo -e "${APP} should be reachable on port 6379.
|
||||||
|
${BL}valkey-cli -h ${IP} -p 6379${CL} \n"
|
||||||
@ -29,7 +29,7 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "Ampache" "ampache/ampache"; then
|
if check_for_gh_release "Ampache" "ampache/ampache"; then
|
||||||
|
import_local_ip
|
||||||
msg_info "Stopping Apache"
|
msg_info "Stopping Apache"
|
||||||
systemctl stop apache2
|
systemctl stop apache2
|
||||||
msg_ok "Stopped Apache"
|
msg_ok "Stopped Apache"
|
||||||
|
|||||||
@ -29,7 +29,7 @@ PG_VERSION="16" PG_MODULES="pgvector" setup_postgresql
|
|||||||
PG_DB_NAME="affine" PG_DB_USER="affine" setup_postgresql_db
|
PG_DB_NAME="affine" PG_DB_USER="affine" setup_postgresql_db
|
||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
setup_rust
|
setup_rust
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "affine_app" "toeverything/AFFiNE" "tarball" "latest" "/opt/affine"
|
fetch_and_deploy_gh_release "affine_app" "toeverything/AFFiNE" "tarball" "latest" "/opt/affine"
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ update_os
|
|||||||
|
|
||||||
msg_info "Setup Functions"
|
msg_info "Setup Functions"
|
||||||
setup_local_ip_helper
|
setup_local_ip_helper
|
||||||
|
import_local_ip
|
||||||
msg_ok "Setup Functions"
|
msg_ok "Setup Functions"
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
|
|||||||
@ -28,7 +28,7 @@ setup_go
|
|||||||
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
NODE_VERSION="24" NODE_MODULE="yarn" setup_nodejs
|
||||||
RUST_CRATES="wasm-pack" setup_rust
|
RUST_CRATES="wasm-pack" setup_rust
|
||||||
$STD rustup target add wasm32-unknown-unknown
|
$STD rustup target add wasm32-unknown-unknown
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
ENTE_CLI_VERSION=$(curl -s https://api.github.com/repos/ente-io/ente/releases | jq -r '[.[] | select(.tag_name | startswith("cli-v"))][0].tag_name')
|
ENTE_CLI_VERSION=$(curl -s https://api.github.com/repos/ente-io/ente/releases | jq -r '[.[] | select(.tag_name | startswith("cli-v"))][0].tag_name')
|
||||||
fetch_and_deploy_gh_release "ente-server" "ente-io/ente" "tarball" "latest" "/opt/ente"
|
fetch_and_deploy_gh_release "ente-server" "ente-io/ente" "tarball" "latest" "/opt/ente"
|
||||||
|
|||||||
@ -22,7 +22,7 @@ PG_VERSION="16" setup_postgresql
|
|||||||
PG_DB_NAME="linkwardendb" PG_DB_USER="linkwarden" setup_postgresql_db
|
PG_DB_NAME="linkwardendb" PG_DB_USER="linkwarden" setup_postgresql_db
|
||||||
RUST_CRATES="monolith" setup_rust
|
RUST_CRATES="monolith" setup_rust
|
||||||
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden"
|
fetch_and_deploy_gh_release "linkwarden" "linkwarden/linkwarden"
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
|
read -r -p "${TAB3}Would you like to add Adminer? <y/N> " prompt
|
||||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $STD apt install -y \
|
|||||||
gnupg
|
gnupg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
import_local_ip
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
MARIADB_DB_NAME="piler" MARIADB_DB_USER="piler" setup_mariadb_db
|
MARIADB_DB_NAME="piler" MARIADB_DB_USER="piler" setup_mariadb_db
|
||||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,gd,memcached,pdo,mysql,curl,zip" setup_php
|
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="ldap,gd,memcached,pdo,mysql,curl,zip" setup_php
|
||||||
|
|||||||
@ -29,7 +29,7 @@ useradd -rU -s /bin/bash pixelfed
|
|||||||
usermod -aG redis pixelfed
|
usermod -aG redis pixelfed
|
||||||
msg_ok "Created Pixelfed User"
|
msg_ok "Created Pixelfed User"
|
||||||
|
|
||||||
|
import_local_ip
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
PG_DB_NAME="pixelfed" PG_DB_USER="pixelfed" setup_postgresql_db
|
PG_DB_NAME="pixelfed" PG_DB_USER="pixelfed" setup_postgresql_db
|
||||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ctype,exif,imagick,pgsql,redis,tokenizer" PHP_UPLOAD_MAX_FILESIZE="500M" PHP_POST_MAX_SIZE="500M" PHP_MAX_EXECUTION_TIME="600" setup_php
|
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ctype,exif,imagick,pgsql,redis,tokenizer" PHP_UPLOAD_MAX_FILESIZE="500M" PHP_POST_MAX_SIZE="500M" PHP_MAX_EXECUTION_TIME="600" setup_php
|
||||||
|
|||||||
@ -24,7 +24,7 @@ msg_ok "Installed dependencies"
|
|||||||
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
|
||||||
fetch_and_deploy_gh_release "wishlist" "cmintey/wishlist" "tarball"
|
fetch_and_deploy_gh_release "wishlist" "cmintey/wishlist" "tarball"
|
||||||
LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist" false)
|
LATEST_APP_VERSION=$(get_latest_github_release "cmintey/wishlist" false)
|
||||||
|
import_local_ip
|
||||||
|
|
||||||
msg_info "Installing Wishlist"
|
msg_info "Installing Wishlist"
|
||||||
cd /opt/wishlist
|
cd /opt/wishlist
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user