fix(surrealdb): address PR review feedback

- Deploy binary to /opt/surrealdb with symlink to /usr/local/bin
- Use literal 'SurrealDB' in messages instead of ${APP}
- Fix installation check path to /opt/surrealdb/surreal
- Update ExecStart to use /opt/surrealdb/surreal
- Use selfhst CDN logo URL and capitalize 'Debian' in JSON
- Capitalize 'Completed Successfully' to match conventions
This commit is contained in:
Poulette
2026-03-01 17:09:02 +01:00
parent 5526825a2a
commit af1f6b44c0
3 changed files with 49 additions and 50 deletions

View File

@@ -25,8 +25,8 @@ function update_script() {
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -f /usr/local/bin/surreal ]]; then if [[ ! -f /opt/surrealdb/surreal ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No SurrealDB Installation Found!"
exit exit
fi fi
@@ -35,8 +35,8 @@ function update_script() {
systemctl stop surrealdb systemctl stop surrealdb
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/usr/local/bin" "surreal-v*.linux-amd64.tgz" fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/opt/surrealdb" "surreal-v*.linux-amd64.tgz"
chmod +x /usr/local/bin/surreal chmod +x /opt/surrealdb/surreal
msg_info "Starting Service" msg_info "Starting Service"
systemctl start surrealdb systemctl start surrealdb
@@ -50,7 +50,7 @@ start
build_container build_container
description description
msg_ok "Completed successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

View File

@@ -1,44 +1,42 @@
{ {
"name": "SurrealDB", "name": "SurrealDB",
"slug": "surrealdb", "slug": "surrealdb",
"categories": [ "categories": [8],
8 "date_created": "2026-02-26",
], "type": "ct",
"date_created": "2026-02-26", "updateable": true,
"type": "ct", "privileged": false,
"updateable": true, "interface_port": 8000,
"privileged": false, "documentation": "https://surrealdb.com/docs",
"interface_port": 8000, "website": "https://surrealdb.com/",
"documentation": "https://surrealdb.com/docs", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/surrealdb.webp",
"website": "https://surrealdb.com/", "config_path": "/opt/surrealdb/.env",
"logo": "https://surrealdb.com/assets/static/f8ce1df8b5823f08.7t3KDG7y.webp", "description": "SurrealDB is a multi-model database that combines the power of document, graph, and relational databases into a single platform, offering real-time queries, built-in permissions, and a simplified backend stack.",
"config_path": "/opt/surrealdb/.env", "install_methods": [
"description": "SurrealDB is a multi-model database that combines the power of document, graph, and relational databases into a single platform, offering real-time queries, built-in permissions, and a simplified backend stack.", {
"install_methods": [ "type": "default",
{ "script": "ct/surrealdb.sh",
"type": "default", "resources": {
"script": "ct/surrealdb.sh", "cpu": 2,
"resources": { "ram": 1024,
"cpu": 2, "hdd": 4,
"ram": 1024, "os": "Debian",
"hdd": 4, "version": "13"
"os": "debian", }
"version": "13" }
} ],
} "default_credentials": {
], "username": "root",
"default_credentials": { "password": null
"username": "root", },
"password": null "notes": [
}, {
"notes": [ "text": "SurrealDB web interface is available on port 8000.",
{ "type": "info"
"text": "SurrealDB web interface is available on port 8000.", },
"type": "info" {
}, "text": "Default credentials are saved in ~/surrealdb.creds.",
{ "type": "info"
"text": "Default credentials are saved in ~/surrealdb.creds.", }
"type": "info" ]
}
]
} }

View File

@@ -14,8 +14,9 @@ network_check
update_os update_os
msg_info "Installing SurrealDB" msg_info "Installing SurrealDB"
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/usr/local/bin" "surreal-v*.linux-amd64.tgz" fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/opt/surrealdb" "surreal-v*.linux-amd64.tgz"
chmod +x /usr/local/bin/surreal chmod +x /opt/surrealdb/surreal
ln -sf /opt/surrealdb/surreal /usr/local/bin/surreal
msg_ok "Installed SurrealDB" msg_ok "Installed SurrealDB"
msg_info "Configuring SurrealDB" msg_info "Configuring SurrealDB"
@@ -40,7 +41,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
EnvironmentFile=/opt/surrealdb/.env EnvironmentFile=/opt/surrealdb/.env
ExecStart=/usr/local/bin/surreal start --bind 0.0.0.0:8000 --user root --pass \${SURREALDB_PASS} rocksdb:///opt/surrealdb/data/srdb.db ExecStart=/opt/surrealdb/surreal start --bind 0.0.0.0:8000 --user root --pass \${SURREALDB_PASS} rocksdb:///opt/surrealdb/data/srdb.db
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5