Skip to content

Commit ec1391c

Browse files
New Script: rwMarkable (#8215)
* 'Add new script' * Update rwmarkable.sh --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: Slaviša Arežina <[email protected]>
1 parent 32230b4 commit ec1391c

File tree

4 files changed

+182
-0
lines changed

4 files changed

+182
-0
lines changed

ct/headers/rwmarkable

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ ___ __ __ __
2+
______ __/ |/ /___ ______/ /______ _/ /_ / /__
3+
/ ___/ | /| / / /|_/ / __ `/ ___/ //_/ __ `/ __ \/ / _ \
4+
/ / | |/ |/ / / / / /_/ / / / ,< / /_/ / /_/ / / __/
5+
/_/ |__/|__/_/ /_/\__,_/_/ /_/|_|\__,_/_.___/_/\___/
6+

ct/rwmarkable.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/fccview/rwMarkable
7+
8+
APP="rwMarkable"
9+
var_tags="${var_tags:-tasks;notes}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-6}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
27+
if [[ ! -d /opt/rwmarkable ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
if check_for_gh_release "rwMarkable" "fccview/rwMarkable"; then
33+
msg_info "Stopping ${APP}"
34+
systemctl stop rwmarkable
35+
msg_ok "Stopped ${APP}"
36+
37+
msg_info "Backing up configuration & data"
38+
cd /opt/rwmarkable
39+
cp ./.env /opt/app.env
40+
$STD tar -cf /opt/data_config.tar ./data ./config
41+
msg_ok "Backed up configuration & data"
42+
43+
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
44+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rwMarkable" "fccview/rwMarkable" "tarball" "latest" "/opt/rwmarkable"
45+
46+
msg_info "Updating app"
47+
cd /opt/rwmarkable
48+
$STD yarn --frozen-lockfile
49+
$STD yarn next telemetry disable
50+
$STD yarn build
51+
msg_ok "Updated app"
52+
53+
msg_info "Restoring configuration & data"
54+
mv /opt/app.env /opt/rwmarkable/.env
55+
$STD tar -xf /opt/data_config.tar
56+
msg_ok "Restored configuration & data"
57+
58+
msg_info "Restarting ${APP} service"
59+
systemctl start rwmarkable
60+
msg_ok "Restarted ${APP} service"
61+
rm /opt/data_config.tar
62+
msg_ok "Updated Successfully"
63+
fi
64+
exit
65+
}
66+
67+
start
68+
build_container
69+
description
70+
71+
msg_ok "Completed Successfully!\n"
72+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
73+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
74+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "rwMarkable",
3+
"slug": "rwmarkable",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2024-10-02",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3000,
12+
"documentation": "https://github.com/fccview/rwMarkable/blob/main/README.md",
13+
"website": "https://github.com/fccview/rwMarkable",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/rwmarkable.webp",
15+
"config_path": "/opt/rwmarkable/.env",
16+
"description": "A simple, self-hosted app for your checklists and notes. Tired of bloated, cloud-based to-do apps? rwMarkable is a lightweight alternative for managing your personal checklists and notes. It's built with Next.js 14, is easy to deploy, and keeps all your data on your own server.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/rwmarkable.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 2048,
24+
"hdd": 6,
25+
"os": "debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": []
35+
}
36+

install/rwmarkable-install.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/fccview/rwMarkable
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+
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
17+
fetch_and_deploy_gh_release "rwMarkable" "fccview/rwMarkable" "tarball" "latest" "/opt/rwmarkable"
18+
19+
msg_info "Installing ${APPLICATION}"
20+
cd /opt/rwmarkable
21+
$STD yarn --frozen-lockfile
22+
$STD yarn next telemetry disable
23+
$STD yarn build
24+
mkdir -p data/{users,checklists,notes}
25+
26+
cat <<EOF >/opt/rwmarkable/.env
27+
NODE_ENV=production
28+
# HTTPS=true
29+
30+
# --- SSO with OIDC (optional)
31+
# SSO_MODE=oidc
32+
# OIDC_ISSUER=<your-oidc-issuer-url>
33+
# OIDC_CLIENT_ID=<oidc-client-id>
34+
# APP_URL=<https://app.domain.tld>
35+
# SSO_FALLBACK_LOCAL=true # Allow both SSO and normal login
36+
# OIDC_CLIENT_SECRET=your_client_secret # Enable confidential client mode with client authentication
37+
# OIDC_ADMIN_GROUPS=admins # Map provider groups to admin role
38+
EOF
39+
msg_ok "Installed ${APPLICATION}"
40+
41+
msg_info "Creating Service"
42+
cat <<EOF >/etc/systemd/system/rwmarkable.service
43+
[Unit]
44+
Description=rwMarkable server
45+
After=network.target
46+
47+
[Service]
48+
WorkingDirectory=/opt/rwmarkable
49+
EnvironmentFile=/opt/rwmarkable/.env
50+
ExecStart=yarn start
51+
Restart=on-abnormal
52+
53+
[Install]
54+
WantedBy=multi-user.target
55+
EOF
56+
systemctl enable -q --now rwmarkable
57+
msg_ok "Created Service"
58+
59+
motd_ssh
60+
customize
61+
62+
msg_info "Cleaning up"
63+
$STD apt -y autoremove
64+
$STD apt -y autoclean
65+
$STD apt -y clean
66+
msg_ok "Cleaned"

0 commit comments

Comments
 (0)