Merge pull request #1147 from pshankinclarke/valkey

Add Valkey LXC
This commit is contained in:
CanbiZ 2025-11-26 09:04:54 +01:00 committed by GitHub
commit 228caa3517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 105 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/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: pshankinclarke (lazarillo)
# 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 Valkey Installation Found!"
exit
fi
msg_info "Updating Valkey LXC"
$STD apt update
$STD apt -y upgrade
msg_ok "Updated Valkey 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 URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${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": []
}

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

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: pshankinclarke (lazarillo)
# 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 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