From 8fcc515303f4773f6d01a903cfb0b7df61549152 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 27 Mar 2026 13:59:27 +0100 Subject: [PATCH] Refactor SurrealDB: remove msg wrapper, remove creds file, add JSON --- install/surrealdb-install.sh | 7 ------- json/surrealdb.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 json/surrealdb.json diff --git a/install/surrealdb-install.sh b/install/surrealdb-install.sh index 3cd93844..08de549d 100644 --- a/install/surrealdb-install.sh +++ b/install/surrealdb-install.sh @@ -13,11 +13,9 @@ setting_up_container network_check update_os -msg_info "Installing SurrealDB" fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/opt/surrealdb" "surreal-v*.linux-amd64.tgz" chmod +x /opt/surrealdb/surreal ln -sf /opt/surrealdb/surreal /usr/local/bin/surreal -msg_ok "Installed SurrealDB" msg_info "Configuring SurrealDB" mkdir -p /opt/surrealdb/data @@ -25,11 +23,6 @@ SURREALDB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) cat </opt/surrealdb/.env SURREALDB_PASS=${SURREALDB_PASS} EOF -{ - echo "SurrealDB Credentials" - echo "Username: root" - echo "Password: ${SURREALDB_PASS}" -} >>~/surrealdb.creds msg_ok "Configured SurrealDB" msg_info "Creating Service" diff --git a/json/surrealdb.json b/json/surrealdb.json new file mode 100644 index 00000000..da6a1404 --- /dev/null +++ b/json/surrealdb.json @@ -0,0 +1,33 @@ +{ + "name": "SurrealDB", + "slug": "surrealdb", + "categories": [8], + "date_created": "2026-03-27", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8000, + "documentation": "https://surrealdb.com/docs", + "website": "https://surrealdb.com", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/surrealdb.webp", + "config_path": "/opt/surrealdb/.env", + "description": "SurrealDB is a scalable, distributed, collaborative, document-graph database for the realtime web, combining the best of relational, document, and graph databases.", + "install_methods": [ + { + "type": "default", + "script": "ct/surrealdb.sh", + "resources": { + "cpu": 2, + "ram": 1024, + "hdd": 4, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "root", + "password": "auto-generated (see /opt/surrealdb/.env)" + }, + "notes": [] +}