mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-13 17:56:21 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b64d9a707f |
No files matched your search
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/weaviate/weaviate
|
||||
|
||||
APP="Weaviate"
|
||||
var_tags="${var_tags:-database;vector;ai}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_api_key="${var_api_key:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/weaviate ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "weaviate" "weaviate/weaviate"; then
|
||||
msg_info "Stopping Weaviate"
|
||||
systemctl stop weaviate
|
||||
msg_ok "Stopped Weaviate"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "weaviate" "weaviate/weaviate" "prebuild" "latest" "/opt/weaviate" "weaviate-v*-linux-$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Starting Weaviate"
|
||||
systemctl start weaviate
|
||||
msg_ok "Started Weaviate"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
||||
echo -e "${INFO}${YW}API key (user admin): /opt/weaviate_data/.env (inside the container)${CL}"
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/weaviate/weaviate
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "weaviate" "weaviate/weaviate" "prebuild" "latest" "/opt/weaviate" "weaviate-v*-linux-$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Configuring Weaviate"
|
||||
mkdir -p /opt/weaviate_data/data
|
||||
cat <<EOF >/opt/weaviate_data/.env
|
||||
PERSISTENCE_DATA_PATH=/opt/weaviate_data/data
|
||||
QUERY_DEFAULTS_LIMIT=25
|
||||
CLUSTER_HOSTNAME=node1
|
||||
CLUSTER_BIND_ADDR=127.0.0.1
|
||||
CLUSTER_BASIC_AUTH_USERNAME=weaviate
|
||||
CLUSTER_BASIC_AUTH_PASSWORD=$(random_password)
|
||||
GRPC_PORT=50051
|
||||
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=false
|
||||
AUTHENTICATION_APIKEY_ENABLED=true
|
||||
AUTHENTICATION_APIKEY_ALLOWED_KEYS=${var_api_key:-$(random_password 32)}
|
||||
AUTHENTICATION_APIKEY_USERS=admin
|
||||
AUTHENTICATION_DB_USERS_ENABLED=true
|
||||
AUTHORIZATION_RBAC_ENABLED=true
|
||||
AUTHORIZATION_RBAC_ROOT_USERS=admin
|
||||
LIMIT_RESOURCES=true
|
||||
GO_PROFILING_DISABLE=true
|
||||
DISABLE_TELEMETRY=true
|
||||
EOF
|
||||
chmod 600 /opt/weaviate_data/.env
|
||||
msg_ok "Configured Weaviate"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/weaviate.service
|
||||
[Unit]
|
||||
Description=Weaviate
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/weaviate_data
|
||||
EnvironmentFile=/opt/weaviate_data/.env
|
||||
ExecStart=/opt/weaviate/weaviate --host 0.0.0.0 --port 8080 --scheme http
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now weaviate
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user