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_resources
if [[ ! -f /usr/local/bin/surreal ]]; then
msg_error "No ${APP} Installation Found!"
if [[ ! -f /opt/surrealdb/surreal ]]; then
msg_error "No SurrealDB Installation Found!"
exit
fi
@@ -35,8 +35,8 @@ function update_script() {
systemctl stop surrealdb
msg_ok "Stopped Service"
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/usr/local/bin" "surreal-v*.linux-amd64.tgz"
chmod +x /usr/local/bin/surreal
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/opt/surrealdb" "surreal-v*.linux-amd64.tgz"
chmod +x /opt/surrealdb/surreal
msg_info "Starting Service"
systemctl start surrealdb
@@ -50,7 +50,7 @@ start
build_container
description
msg_ok "Completed successfully!\n"
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

@@ -1,44 +1,42 @@
{
"name": "SurrealDB",
"slug": "surrealdb",
"categories": [
8
],
"date_created": "2026-02-26",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8000,
"documentation": "https://surrealdb.com/docs",
"website": "https://surrealdb.com/",
"logo": "https://surrealdb.com/assets/static/f8ce1df8b5823f08.7t3KDG7y.webp",
"config_path": "/opt/surrealdb/.env",
"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",
"resources": {
"cpu": 2,
"ram": 1024,
"hdd": 4,
"os": "debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "root",
"password": null
},
"notes": [
{
"text": "SurrealDB web interface is available on port 8000.",
"type": "info"
},
{
"text": "Default credentials are saved in ~/surrealdb.creds.",
"type": "info"
}
]
"name": "SurrealDB",
"slug": "surrealdb",
"categories": [8],
"date_created": "2026-02-26",
"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 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",
"resources": {
"cpu": 2,
"ram": 1024,
"hdd": 4,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": "root",
"password": null
},
"notes": [
{
"text": "SurrealDB web interface is available on port 8000.",
"type": "info"
},
{
"text": "Default credentials are saved in ~/surrealdb.creds.",
"type": "info"
}
]
}

View File

@@ -14,8 +14,9 @@ network_check
update_os
msg_info "Installing SurrealDB"
fetch_and_deploy_gh_release "surrealdb" "surrealdb/surrealdb" "prebuild" "latest" "/usr/local/bin" "surreal-v*.linux-amd64.tgz"
chmod +x /usr/local/bin/surreal
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"
@@ -40,7 +41,7 @@ After=network.target
[Service]
Type=simple
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
RestartSec=5