Add calagopus (ct)

This commit is contained in:
push-app-to-main[bot]
2026-10-19 17:17:32 +00:00
parent c6a14ac506
commit b1c570ebce
2 changed files with 137 additions and 0 deletions

60
ct/calagopus.sh Executable file
View File

@@ -0,0 +1,60 @@
#!/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: Jelcoo
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://calagopus.com/
APP="Calagopus"
var_tags="${var_tags:-panel;game-server}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-40}"
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 /usr/local/bin/calagopus-panel ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "calagopus-panel" "calagopus/panel"; then
msg_info "Stopping Service"
systemctl stop calagopus-panel
msg_ok "Stopped Service"
create_backup /etc/calagopus/.env /var/lib/calagopus
fetch_and_deploy_gh_release "calagopus-panel" "calagopus/panel" "singlefile" "latest" "/usr/local/bin" "panel-rs-aio-$(arch_resolve x86_64 aarch64)-linux"
restore_backup
msg_info "Starting Service"
systemctl start calagopus-panel
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}:8000${CL}"

View File

@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Jelcoo
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://calagopus.com/
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 valkey
systemctl enable -q --now valkey-server
msg_ok "Installed Dependencies"
PG_VERSION="18" setup_postgresql
PG_DB_NAME="panel" PG_DB_USER="calagopus" setup_postgresql_db
setup_docker
fetch_and_deploy_gh_release "calagopus-panel" "calagopus/panel" "singlefile" "latest" "/usr/local/bin" "panel-rs-aio-$(arch_resolve x86_64 aarch64)-linux"
msg_info "Configuring Calagopus"
mkdir -p /etc/calagopus /var/lib/calagopus /var/log/calagopus
mkdir -p /etc/calagopus-wings /var/lib/calagopus-wings /var/log/calagopus-wings /tmp/calagopus-wings
APP_ENCRYPTION_KEY=$(openssl rand -hex 16)
cat <<EOF >/etc/calagopus/.env
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
DATABASE_MIGRATE=true
REDIS_URL=redis://localhost
PORT=8000
APP_ENCRYPTION_KEY=${APP_ENCRYPTION_KEY}
APP_LOG_DIRECTORY=/var/log/calagopus
APP_PRIMARY=true
APP_ENABLE_WINGS_PROXY=true
APP_USE_DECRYPTION_CACHE=true
APP_USE_INTERNAL_CACHE=true
AIO_BASE_WINGS_CONFIGURATION=/etc/calagopus/wings-config.yml
EOF
chmod 600 /etc/calagopus/.env
cat <<EOF >/etc/calagopus/wings-config.yml
app_name: Calagopus
EOF
msg_ok "Configured Calagopus"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/calagopus-panel.service
[Unit]
Description=Calagopus Panel
After=network.target postgresql.service valkey-server.service docker.service
Requires=postgresql.service valkey-server.service docker.service
[Service]
Type=simple
User=root
WorkingDirectory=/etc/calagopus
EnvironmentFile=/etc/calagopus/.env
ExecStart=/usr/local/bin/calagopus-panel
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now calagopus-panel
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc