Add Valkey LXC

This commit is contained in:
pshankinclarke 2025-11-24 17:53:31 -08:00
parent 1eb8111a28
commit b745fd01b2
3 changed files with 124 additions and 0 deletions

45
ct/valkey.sh Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://valkey.io/
APP="Valkey"
var_tags="${var_tags:-database}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
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 [[ ! -f /lib/systemd/system/valkey-server.service ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
$STD apt update
$STD apt -y upgrade
msg_ok "Updated $APP LXC"
msg_ok "Updated successfully!"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}${IP}:6379${CL}"

View File

@ -0,0 +1,35 @@
{
"name": "Valkey",
"slug": "valkey",
"categories": [
9
],
"date_created": "2025-11-24",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 6379,
"documentation": "https://valkey.io/docs/",
"config_path": "/etc/valkey/valkey.conf",
"website": "https://valkey.io/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/valkey.webp",
"description": "Valkey is an open source (BSD) high-performance key/value datastore that supports a variety of workloads such as caching, message queues, and can act as a primary database. The project is backed by the Linux Foundation, ensuring it will remain open source forever.",
"install_methods": [
{
"type": "default",
"script": "ct/valkey.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}

44
install/valkey-install.sh Normal file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://valkey.io/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
apt-transport-https \
lsb-release
msg_ok "Installed Dependencies"
DEB_VER="$(cat /etc/debian_version)"
if [[ "$DEB_VER" =~ ^([0-9]+) ]]; then
MAJOR="${BASH_REMATCH[1]}"
if (( MAJOR < 13 )); then
msg_error "Unsupported Debian version."
exit 1
fi
else
msg_error "Unable to determine Debian version."
exit 1
fi
msg_info "Installing Valkey"
$STD apt update
$STD apt install -y valkey
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
systemctl enable -q --now valkey-server
msg_ok "Installed Valkey"
motd_ssh
customize
cleanup_lxc