This commit is contained in:
push-app-to-main[bot]
2026-09-02 16:32:24 +02:00
committed by GitHub
parent a2500a091b
commit aa2e6715e4
3 changed files with 219 additions and 0 deletions

6
ct/headers/kaneo Normal file
View File

@@ -0,0 +1,6 @@
__ __
/ //_/___ _____ ___ ____
/ ,< / __ `/ __ \/ _ \/ __ \
/ /| / /_/ / / / / __/ /_/ /
/_/ |_\__,_/_/ /_/\___/\____/

79
ct/kaneo.sh Normal file
View File

@@ -0,0 +1,79 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
_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: onionrings29
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/usekaneo/kaneo
APP="Kaneo"
var_tags="${var_tags:-project-management;productivity}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-6144}"
var_disk="${var_disk:-20}"
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}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/kaneo ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "kaneo" "usekaneo/kaneo"; then
msg_info "Stopping Service"
systemctl stop kaneo
msg_ok "Stopped Service"
create_backup /opt/kaneo/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kaneo" "usekaneo/kaneo" "tarball"
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/kaneo/package.json)
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
restore_backup
msg_info "Configuring Kaneo"
cat <<EOF >/opt/kaneo/apps/web/.env.production
VITE_API_URL=$(grep '^KANEO_API_URL=' /opt/kaneo/.env | cut -d= -f2-)
VITE_CLIENT_URL=$(grep '^KANEO_CLIENT_URL=' /opt/kaneo/.env | cut -d= -f2-)
EOF
msg_ok "Configured Kaneo"
msg_info "Building Kaneo"
cd /opt/kaneo
export NODE_OPTIONS="--max-old-space-size=4096"
HUSKY=0 $STD pnpm install --frozen-lockfile
$STD pnpm exec turbo build --filter=@kaneo/api --filter=@kaneo/web
unset NODE_OPTIONS
msg_ok "Built Kaneo"
msg_info "Starting Service"
systemctl start kaneo
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 "${TAB}${GATEWAY}${BGN}http://${IP}:5173${CL}"

134
install/kaneo-install.sh Normal file
View File

@@ -0,0 +1,134 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: onionrings29
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/usekaneo/kaneo
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 nginx
msg_ok "Installed Dependencies"
PG_VERSION="17" setup_postgresql
PG_DB_NAME="kaneo" PG_DB_USER="kaneo" setup_postgresql_db
fetch_and_deploy_gh_release "kaneo" "usekaneo/kaneo" "tarball"
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/kaneo/package.json)
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
msg_info "Configuring Kaneo"
cat <<EOF >/opt/kaneo/.env
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
AUTH_SECRET=$(openssl rand -hex 32)
KANEO_CLIENT_URL=http://${LOCAL_IP}:5173
KANEO_API_URL=http://${LOCAL_IP}:5173/api
EOF
cat <<EOF >/opt/kaneo/apps/web/.env.production
VITE_API_URL=http://${LOCAL_IP}:5173/api
VITE_CLIENT_URL=http://${LOCAL_IP}:5173
EOF
msg_ok "Configured Kaneo"
msg_info "Building Kaneo"
cd /opt/kaneo
export NODE_OPTIONS="--max-old-space-size=4096"
HUSKY=0 $STD pnpm install --frozen-lockfile
$STD pnpm exec turbo build --filter=@kaneo/api --filter=@kaneo/web
unset NODE_OPTIONS
msg_ok "Built Kaneo"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/kaneo.service
[Unit]
Description=Kaneo API
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/kaneo
Environment=NODE_ENV=production
EnvironmentFile=/opt/kaneo/.env
ExecStart=/usr/bin/node /opt/kaneo/apps/api/dist/index.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now kaneo
msg_ok "Created Service"
msg_info "Configuring Nginx"
cat <<EOF >/etc/nginx/sites-available/kaneo
server {
listen 5173;
server_name _;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
client_max_body_size 25M;
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 6;
location = /.well-known/oauth-protected-resource/api/mcp {
proxy_pass http://127.0.0.1:1337/.well-known/oauth-protected-resource/api/mcp;
proxy_http_version 1.1;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location = /.well-known/oauth-authorization-server/api {
proxy_pass http://127.0.0.1:1337/.well-known/oauth-authorization-server/api;
proxy_http_version 1.1;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location /.well-known/ {
return 404;
}
location /api/ {
proxy_pass http://127.0.0.1:1337/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location / {
root /opt/kaneo/apps/web/dist;
index index.html;
try_files \$uri \$uri/ /index.html;
}
}
EOF
nginx_enable_site kaneo
msg_ok "Configured Nginx"
motd_ssh
customize
cleanup_lxc