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 | |
|---|---|---|---|
|
|
5205f536e5 |
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#!/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/langflow-ai/langflow
|
||||
|
||||
APP="Langflow"
|
||||
var_tags="${var_tags:-ai;llm;agents}"
|
||||
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:-no}" # unset = ask the user; set yes/no only when verified
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_user="${var_admin_user:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/langflow ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "langflow" "langflow-ai/langflow"; then
|
||||
msg_info "Stopping Langflow"
|
||||
systemctl stop langflow
|
||||
msg_ok "Stopped Langflow"
|
||||
|
||||
PYTHON_VERSION="3.14" USE_UVX="YES" setup_uv
|
||||
|
||||
msg_info "Updating Langflow"
|
||||
$STD uv venv --clear --python 3.14 /opt/langflow/.venv
|
||||
$STD uv pip install --python /opt/langflow/.venv/bin/python "langflow==${CHECK_UPDATE_RELEASE#v}"
|
||||
cat <<EOF >~/.langflow
|
||||
${CHECK_UPDATE_RELEASE#v}
|
||||
EOF
|
||||
msg_ok "Updated Langflow"
|
||||
|
||||
msg_info "Starting Langflow"
|
||||
systemctl start langflow
|
||||
msg_ok "Started Langflow"
|
||||
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}:7860${CL}"
|
||||
echo -e "${INFO}${YW}Login: LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD in /opt/langflow_data/.env (inside the container)${CL}"
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/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/langflow-ai/langflow
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
PYTHON_VERSION="3.14" USE_UVX="YES" setup_uv
|
||||
|
||||
LANGFLOW_VERSION="${var_appversion:-$(get_latest_github_release "langflow-ai/langflow")}"
|
||||
msg_info "Installing Langflow ${LANGFLOW_VERSION#v}"
|
||||
$STD uv venv --python 3.14 /opt/langflow/.venv
|
||||
$STD uv pip install --python /opt/langflow/.venv/bin/python "langflow==${LANGFLOW_VERSION#v}"
|
||||
cat <<EOF >~/.langflow
|
||||
${LANGFLOW_VERSION#v}
|
||||
EOF
|
||||
msg_ok "Installed Langflow ${LANGFLOW_VERSION#v}"
|
||||
|
||||
msg_info "Configuring Langflow"
|
||||
mkdir -p /opt/langflow_data/logs
|
||||
cat <<EOF >/opt/langflow_data/.env
|
||||
LANGFLOW_HOST=0.0.0.0
|
||||
LANGFLOW_PORT=7860
|
||||
LANGFLOW_CONFIG_DIR=/opt/langflow_data
|
||||
LANGFLOW_DATABASE_URL=sqlite:////opt/langflow_data/langflow.db
|
||||
LANGFLOW_KNOWLEDGE_BASES_DIR=/opt/langflow_data/knowledge_bases
|
||||
LANGFLOW_LOG_FILE=/opt/langflow_data/logs/langflow.log
|
||||
LANGFLOW_SECRET_KEY=$(/opt/langflow/.venv/bin/python -c "from secrets import token_urlsafe; print(token_urlsafe(32))")
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
LANGFLOW_SUPERUSER='${var_admin_user:-langflow}'
|
||||
LANGFLOW_SUPERUSER_PASSWORD='${var_admin_pass:-$(random_password)}'
|
||||
EOF
|
||||
chmod 600 /opt/langflow_data/.env
|
||||
msg_ok "Configured Langflow"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/langflow.service
|
||||
[Unit]
|
||||
Description=Langflow
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/langflow_data
|
||||
EnvironmentFile=/opt/langflow_data/.env
|
||||
ExecStart=/opt/langflow/.venv/bin/langflow run
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now langflow
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user