Skip to content

Commit 774cdca

Browse files
tlissakMickLesk
andauthored
New Script: Typesense (#1291)
* Add typesense database lxc container * fully upgrade typesende nstall * Update typesense.sh * Update typesense.json --------- Co-authored-by: CanbiZ <[email protected]>
1 parent 784e109 commit 774cdca

File tree

3 files changed

+127
-0
lines changed

3 files changed

+127
-0
lines changed

ct/typesense.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tlissak | Co-Author MickLesk
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://typesense.org/
7+
8+
# App Default Values
9+
APP="TypeSense"
10+
var_tags="database"
11+
var_cpu="1"
12+
var_ram="1024"
13+
var_disk="4"
14+
var_os="debian"
15+
var_version="12"
16+
var_unprivileged="1"
17+
18+
# App Output & Base Settings
19+
header_info "$APP"
20+
base_settings
21+
22+
# Core
23+
variables
24+
color
25+
catch_errors
26+
27+
function update_script() {
28+
header_info
29+
check_container_storage
30+
check_container_resources
31+
if [[ ! -f /etc/typesense/typesense-server.ini ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
msg_info "Updating ${APP} LXC"
36+
apt-get update &>/dev/null
37+
apt-get -y upgrade &>/dev/null
38+
msg_ok "Updated Successfully"
39+
exit
40+
}
41+
42+
start
43+
build_container
44+
description
45+
46+
msg_ok "Completed Successfully!\n"
47+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
48+
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
49+
echo -e "${TAB}${GATEWAY}${BGN}${IP}:8108${CL}"

install/typesense-install.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tlissak
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://typesense.org/
7+
8+
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt-get install -y \
18+
curl \
19+
mc \
20+
sudo
21+
msg_ok "Installed Dependencies"
22+
23+
msg_info "Installing TypeSense"
24+
RELEASE=$(curl -s https://api.github.com/repos/typesense/typesense/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
25+
cd /opt
26+
wget -q -O https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-amd64.deb
27+
$STD apt install -y /opt/typesense-server-${RELEASE}-amd64.deb
28+
echo 'enable-cors = true' >> /etc/typesense/typesense-server.ini
29+
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
30+
msg_ok "Installed TypeSense"
31+
32+
motd_ssh
33+
customize
34+
35+
msg_info "Cleaning up"
36+
rm -rf /opt/typesense-server-${RELEASE}-amd64.deb
37+
$STD apt-get -y autoremove
38+
$STD apt-get -y autoclean
39+
msg_ok "Cleaned"

json/typesense.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "TypeSense",
3+
"slug": "typesense",
4+
"categories": [
5+
5
6+
],
7+
"date_created": "2025-01-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": null,
12+
"documentation": "https://typesense.org/docs/",
13+
"website": "https://typesense.org/",
14+
"logo": "https://typesense.org/_nuxt/img/typesense_logo_white.0f9fb0a.svg",
15+
"description": "Typesense is an open-source, fast, and lightweight search engine optimized for delivering instant, relevant, and typo-tolerant search results. Designed for ease of use and high performance, it offers features like real-time indexing, fuzzy matching, customizable relevance ranking, and a simple API for integration. Typesense is particularly well-suited for applications requiring instant search capabilities, such as e-commerce, documentation, or any content-rich websites. It is often compared to tools like Elasticsearch but is more developer-friendly and less resource-intensive.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/typesense.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 1024,
23+
"hdd": 4,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "This script requires some extra steps after the installation, Please checkout the 'documentation' Button",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)