Skip to content

Commit 42b1751

Browse files
New Script: seelf (#2023)
* add seelf script * changed number of cores for LXC * Update install/seelf-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update install/seelf-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> --------- Co-authored-by: Michel Roegl-Brunner <[email protected]>
1 parent cb6e2c4 commit 42b1751

File tree

3 files changed

+196
-0
lines changed

3 files changed

+196
-0
lines changed

ct/seelf.sh

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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: tremor021
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/YuukanOO/seelf
7+
8+
APP="seelf"
9+
TAGS="server;docker"
10+
var_cpu="2"
11+
var_ram="4096"
12+
var_disk="10"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
base_settings
19+
20+
variables
21+
color
22+
catch_errors
23+
24+
function update_script() {
25+
header_info
26+
check_container_storage
27+
check_container_resources
28+
29+
if [[ ! -d /opt/seelf ]]; then
30+
msg_error "No ${APP} Installation Found!"
31+
exit
32+
fi
33+
34+
RELEASE=$(curl -s https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
35+
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
36+
msg_info "Updating $APP"
37+
38+
msg_info "Stopping $APP"
39+
systemctl stop seelf
40+
msg_ok "Stopped $APP"
41+
42+
msg_info "Updating $APP to v${RELEASE}. Patience"
43+
export PATH=$PATH:/usr/local/go/bin
44+
source ~/.bashrc
45+
wget -q "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz"
46+
tar -xzf v${RELEASE}.tar.gz
47+
cp -r seelf-${RELEASE}/ /opt/seelf
48+
cd /opt/seelf
49+
make build &> /dev/null
50+
msg_ok "Updated $APP to v${RELEASE}"
51+
52+
msg_info "Starting $APP"
53+
systemctl start seelf
54+
msg_ok "Started $APP"
55+
56+
# Cleaning up
57+
msg_info "Cleaning Up"
58+
rm -f ~/*.tar.gz
59+
rm -rf ~/seelf-${RELEASE}
60+
msg_ok "Cleanup Completed"
61+
62+
echo "${RELEASE}" >/opt/${APP}_version.txt
63+
msg_ok "Update Successful"
64+
else
65+
msg_ok "No update required. ${APP} is already at v${RELEASE}"
66+
fi
67+
exit
68+
}
69+
70+
start
71+
build_container
72+
description
73+
74+
msg_ok "Completed Successfully!\n"
75+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
76+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
77+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

install/seelf-install.sh

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tremor021
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/YuukanOO/seelf
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+
sudo \
20+
mc \
21+
make \
22+
gcc
23+
wget -q https://go.dev/dl/go1.23.5.linux-amd64.tar.gz
24+
curl -s -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash &> /dev/null
25+
tar -C /usr/local -xzf go1.23.5.linux-amd64.tar.gz
26+
export PATH=$PATH:/usr/local/go/bin
27+
source ~/.bashrc
28+
$STD nvm install node
29+
msg_ok "Installed Dependencies"
30+
31+
msg_info "Setting up seelf. Patience"
32+
RELEASE=$(curl -s https://api.github.com/repos/YuukanOO/seelf/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
33+
wget -q "https://github.com/YuukanOO/seelf/archive/refs/tags/v${RELEASE}.tar.gz"
34+
tar -xzf v${RELEASE}.tar.gz
35+
mv seelf-${RELEASE}/ /opt/seelf
36+
cd /opt/seelf
37+
$STD make build
38+
PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
39+
{
40+
41+
echo "ADMIN_PASSWORD=$PASS"
42+
} | tee .env ~/seelf.creds > /dev/null
43+
44+
echo "${RELEASE}" >/opt/seelf_version.txt
45+
[email protected] SEELF_ADMIN_PASSWORD=$PASS ./seelf serve &> /dev/null & sleep 5 ; kill $!
46+
msg_ok "Done setting up seelf"
47+
48+
msg_info "Creating Service"
49+
cat <<EOF >/etc/systemd/system/seelf.service
50+
[Unit]
51+
Description=seelf Service
52+
After=network.target
53+
54+
[Service]
55+
Type=simple
56+
User=root
57+
Group=root
58+
WorkingDirectory=/opt/seelf
59+
ExecStart=/opt/seelf/./seelf serve
60+
Restart=always
61+
62+
[Install]
63+
WantedBy=multi-user.target
64+
EOF
65+
systemctl enable -q --now seelf
66+
msg_ok "Created Service"
67+
68+
motd_ssh
69+
customize
70+
71+
# Cleanup
72+
msg_info "Cleaning up"
73+
rm -f ~/v${RELEASE}.tar.gz
74+
rm -f ~/go1.23.5.linux-amd64.tar.gz
75+
$STD apt-get -y autoremove
76+
$STD apt-get -y autoclean
77+
msg_ok "Cleaned"
78+
79+
motd_ssh
80+
customize

json/seelf.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "seelf",
3+
"slug": "seelf",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2025-02-04",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8080,
12+
"documentation": "https://yuukanoo.github.io/seelf/guide/quickstart.html",
13+
"website": "https://yuukanoo.github.io/seelf/",
14+
"logo": "https://yuukanoo.github.io/seelf/logo-dark.svg",
15+
"description": "seelf is a self-hosted software which makes it easy to deploy your own applications on your own hardware using an easy to use interface.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/seelf.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 4096,
23+
"hdd": 10,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "Initial admin email and password: `cat ~/seelf.creds`",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)