mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-30 20:19:48 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d21e3489ae |
No files matched your search
@@ -0,0 +1,61 @@
|
||||
#!/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: andy-vdg
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://agentgateway.dev/
|
||||
|
||||
APP="agentgateway"
|
||||
var_tags="${var_tags:-ai;proxy;mcp}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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 /etc/agentgateway/config.yaml ]]; then
|
||||
msg_error "No agentgateway Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "agentgateway" "agentgateway/agentgateway"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop agentgateway
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
create_backup /etc/agentgateway /opt/agentgateway_data
|
||||
|
||||
fetch_and_deploy_gh_release "agentgateway" "agentgateway/agentgateway" "singlefile" "latest" "/opt/agentgateway" "agentgateway-linux-$(arch_resolve "amd64" "arm64")"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start agentgateway
|
||||
msg_ok "Started Service"
|
||||
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}:4000/ui${CL}"
|
||||
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: andy-vdg
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://agentgateway.dev/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "agentgateway" "agentgateway/agentgateway" "singlefile" "latest" "/opt/agentgateway" "agentgateway-linux-$(arch_resolve "amd64" "arm64")"
|
||||
|
||||
msg_info "Configuring agentgateway"
|
||||
mkdir -p /etc/agentgateway /opt/agentgateway_data
|
||||
cat <<EOF >/etc/agentgateway/config.yaml
|
||||
# yaml-language-server: \$schema=https://agentgateway.dev/schema/config
|
||||
# The config agentgateway bootstraps on first run: traffic and the UI on port 4000,
|
||||
# state in SQLite. The UI has no login until you add policies:
|
||||
# https://agentgateway.dev/docs/standalone/latest/documentation/setup/ui/secure-ui/
|
||||
config:
|
||||
database:
|
||||
url: sqlite:///opt/agentgateway_data/data.db
|
||||
gateways:
|
||||
default:
|
||||
port: 4000
|
||||
ui:
|
||||
gateways: default
|
||||
EOF
|
||||
chmod 600 /etc/agentgateway/config.yaml
|
||||
msg_ok "Configured agentgateway"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/agentgateway.service
|
||||
[Unit]
|
||||
Description=agentgateway
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/opt/agentgateway/agentgateway -f /etc/agentgateway/config.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now agentgateway
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user