Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit c29c0e4

Browse files
committed
chore: updates
1 parent b6b6248 commit c29c0e4

5 files changed

Lines changed: 221 additions & 16 deletions

File tree

ct/docmost.sh

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

ct/headers/docmost

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ __
2+
/ __ \____ _________ ___ ____ _____/ /_
3+
/ / / / __ \/ ___/ __ `__ \/ __ \/ ___/ __/
4+
/ /_/ / /_/ / /__/ / / / / / /_/ (__ ) /_
5+
/_____/\____/\___/_/ /_/ /_/\____/____/\__/
6+

install/docmost-install.sh

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (Canbiz)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/documenso/documenso
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+
gpg \
19+
curl \
20+
sudo \
21+
redis \
22+
make \
23+
mc \
24+
postgresql
25+
msg_ok "Installed Dependencies"
26+
27+
msg_info "Setting up Node.js Repository"
28+
mkdir -p /etc/apt/keyrings
29+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
30+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
31+
msg_ok "Set up Node.js Repository"
32+
33+
msg_info "Installing Node.js"
34+
$STD apt-get update
35+
$STD apt-get install -y nodejs
36+
$STD npm install -g pnpm
37+
msg_ok "Installed Node.js"
38+
39+
msg_info "Setting up PostgreSQL"
40+
DB_NAME="docmost_db"
41+
DB_USER="docmost_user"
42+
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
43+
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
44+
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
45+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
46+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
47+
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
48+
{
49+
echo "Docmost-Credentials"
50+
echo "Database Name: $DB_NAME"
51+
echo "Database User: $DB_USER"
52+
echo "Database Password: $DB_PASS"
53+
} >> ~/docmost.creds
54+
msg_ok "Set up PostgreSQL"
55+
56+
msg_info "Installing Docmost (Patience)"
57+
temp_file=$(mktemp)
58+
RELEASE=$(curl -s https://api.github.com/repos/docmost/docmost/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
59+
wget -q "https://github.com/docmost/docmost/archive/refs/tags/v${RELEASE}.tar.gz" -O "$temp_file"
60+
tar -xzf "$temp_file"
61+
mv docmost-${RELEASE} /opt/docmost
62+
cd /opt/docmost
63+
mv .env.example .env
64+
sed -i "s|APP_SECRET=.*|APP_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" /opt/docmost/.env
65+
sed -i "s|DATABASE_URL=.*|DATABASE_URL=postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME|" /opt/docmost/.env
66+
export NODE_OPTIONS="--max-old-space-size=2048"
67+
$STD pnpm install --force
68+
$STD pnpm build
69+
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
70+
msg_ok "Installed Docmost"
71+
72+
msg_info "Creating Service"
73+
cat <<EOF >/etc/systemd/system/docmost.service
74+
[Unit]
75+
Description=Docmost Service
76+
After=network.target postgresql.service
77+
78+
[Service]
79+
WorkingDirectory=/opt/docmost
80+
ExecStart=/usr/bin/pnpm start
81+
Restart=always
82+
EnvironmentFile=/opt/docmost/.env
83+
84+
[Install]
85+
WantedBy=multi-user.target
86+
EOF
87+
systemctl enable -q --now docmost
88+
msg_ok "Created Service"
89+
90+
motd_ssh
91+
customize
92+
93+
msg_info "Cleaning up"
94+
rm -f "$temp_file"
95+
$STD apt-get -y autoremove
96+
$STD apt-get -y autoclean
97+
msg_ok "Cleaned"
98+
99+
# Modified by surgeon https://github.com/bketelsen/surgeon

install/sqlserver2022-install.sh

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
# Copyright (c) 2021-2025 community-scripts ORG
44
# Author: Kristian Skov
5-
# License: MIT
6-
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
76

8-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
7+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
98
color
109
verb_ip6
1110
catch_errors
@@ -15,33 +14,30 @@ update_os
1514

1615
msg_info "Installing Dependencies"
1716
$STD apt install -y \
18-
curl \
17+
curl \
1918
mc \
2019
sudo \
21-
gpg \
22-
coreutils
20+
gpg \
21+
coreutils
2322
msg_ok "Installed Dependencies"
2423

2524
msg_info "Setup SQL Server 2022"
26-
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
27-
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | sudo tee /etc/apt/sources.list.d/mssql-server-2022.list
28-
#$STD curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
29-
#$STD curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list
30-
$STD apt-get clean *
25+
curl -s https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null
26+
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list > /dev/null
3127
$STD apt-get update -y
32-
apt-get install -y mssql-server
28+
$STD apt-get install -y mssql-server
3329
msg_ok "Setup Server 2022"
3430

3531
msg_info "Installing SQL Server Tools"
3632
export DEBIAN_FRONTEND=noninteractive
3733
export ACCEPT_EULA=Y
38-
curl https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
39-
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
34+
curl -s https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc > /dev/null
35+
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list > /dev/null
4036
$STD apt-get update
4137
$STD apt-get install -y -qq \
4238
mssql-tools18 \
4339
unixodbc-dev
44-
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bash_profile
40+
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile
4541
source ~/.bash_profile
4642
msg_ok "Installed SQL Server Tools"
4743

@@ -53,7 +49,7 @@ else
5349
fi
5450

5551
msg_info "Start Service"
56-
systemctl enable -q --now mssql-server
52+
systemctl enable -q --now mssql-server
5753
msg_ok "Service started"
5854

5955
motd_ssh

json/docmost.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Docmost",
3+
"slug": "docmost",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2025-02-18",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://docmost.com/docs/installation",
13+
"website": "https://docmost.com/",
14+
"logo": "https://raw.githubusercontent.com/docmost/docmost/refs/heads/main/apps/client/public/favicon-32x32.png",
15+
"description": "Open-source collaborative wiki and documentation software Create, collaborate, and share knowledge seamlessly with Docmost. Ideal for managing your wiki, knowledge-base, documentation and a lot more.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/docmost.sh",
20+
"resources": {
21+
"cpu": 3,
22+
"ram": 3072,
23+
"hdd": 7,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

0 commit comments

Comments
 (0)