Skip to content

Commit 909c323

Browse files
Wallabag (#9904)
* Add wallabag (ct) * Apply suggestion from @tremor021 * Apply suggestion from @tremor021 * Apply suggestion from @tremor021 --------- 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 d03b38e commit 909c323

File tree

4 files changed

+265
-0
lines changed

4 files changed

+265
-0
lines changed

ct/headers/wallabag

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/wallabag.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL 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://wallabag.org/
7+
8+
APP="Wallabag"
9+
var_tags="${var_tags:-productivity;read-it-later}"
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/wallabag ]]; then
28+
msg_error "No ${APP} Installation Found!"
29+
exit
30+
fi
31+
32+
if check_for_gh_release "wallabag" "wallabag/wallabag"; then
33+
msg_info "Stopping Services"
34+
systemctl stop nginx php8.3-fpm
35+
msg_ok "Stopped Services"
36+
37+
msg_info "Creating Backup"
38+
cp /opt/wallabag/app/config/parameters.yml /tmp/wallabag_parameters.yml.bak
39+
msg_ok "Created Backup"
40+
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"
42+
43+
msg_info "Restoring Configuration"
44+
cp /tmp/wallabag_parameters.yml.bak /opt/wallabag/app/config/parameters.yml
45+
rm -f /tmp/wallabag_parameters.yml.bak
46+
msg_ok "Restored Configuration"
47+
48+
msg_info "Running Migrations"
49+
cd /opt/wallabag
50+
$STD php bin/console cache:clear --env=prod
51+
$STD php bin/console doctrine:migrations:migrate --env=prod --no-interaction
52+
chown -R www-data:www-data /opt/wallabag
53+
chmod -R 755 /opt/wallabag/{var,web/assets}
54+
msg_ok "Ran Migrations"
55+
56+
msg_info "Starting Services"
57+
systemctl start php8.3-fpm nginx
58+
msg_ok "Started Services"
59+
msg_ok "Updated successfully!"
60+
fi
61+
exit
62+
}
63+
64+
start
65+
build_container
66+
description
67+
68+
msg_ok "Completed Successfully!\n"
69+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
70+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
71+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

frontend/public/json/wallabag.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "Wallabag",
3+
"slug": "wallabag",
4+
"categories": [
5+
12
6+
],
7+
"date_created": "2025-12-09",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"config_path": "/opt/wallabag/app/config/parameters.yml",
12+
"interface_port": 8000,
13+
"documentation": "https://doc.wallabag.org/",
14+
"website": "https://wallabag.org/",
15+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/wallabag.webp",
16+
"description": "Wallabag is a self-hosted read-it-later application. Save web articles to read them later, offline, in a clean and distraction-free interface. Features tagging, full-text search, and browser/mobile app integrations.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/wallabag.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+
"text": "Database credentials are stored in ~/wallabag.creds",
37+
"type": "info"
38+
}
39+
]
40+
}

install/wallabag-install.sh

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
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://wallabag.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 install -y \
18+
nginx \
19+
redis-server \
20+
imagemagick
21+
msg_ok "Installed Dependencies"
22+
23+
import_local_ip
24+
setup_mariadb
25+
MARIADB_DB_NAME="wallabag" MARIADB_DB_USER="wallabag" setup_mariadb_db
26+
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,bz2,curl,gd,imagick,intl,mbstring,mysql,redis,tidy,xml,zip" setup_php
27+
setup_composer
28+
NODE_VERSION="22" setup_nodejs
29+
fetch_and_deploy_gh_release "wallabag" "wallabag/wallabag" "prebuild" "latest" "/opt/wallabag" "wallabag-*.tar.gz"
30+
31+
msg_info "Configuring Wallabag"
32+
cd /opt/wallabag
33+
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
34+
cat <<EOF >/opt/wallabag/app/config/parameters.yml
35+
parameters:
36+
database_driver: pdo_mysql
37+
database_host: 127.0.0.1
38+
database_port: 3306
39+
database_name: ${MARIADB_DB_NAME}
40+
database_user: ${MARIADB_DB_USER}
41+
database_password: ${MARIADB_DB_PASS}
42+
database_path: null
43+
database_table_prefix: wallabag_
44+
database_socket: null
45+
database_charset: utf8mb4
46+
47+
domain_name: http://${LOCAL_IP}:8000
48+
server_name: Wallabag
49+
50+
mailer_dsn: null
51+
52+
locale: en
53+
54+
secret: ${SECRET_KEY}
55+
56+
twofactor_auth: false
57+
twofactor_sender: [email protected]
58+
59+
fosuser_registration: true
60+
fosuser_confirmation: false
61+
62+
fos_oauth_server_access_token_lifetime: 3600
63+
fos_oauth_server_refresh_token_lifetime: 1209600
64+
65+
from_email: [email protected]
66+
67+
rss_limit: 50
68+
69+
rabbitmq_host: localhost
70+
rabbitmq_port: 5672
71+
rabbitmq_user: guest
72+
rabbitmq_password: guest
73+
rabbitmq_prefetch_count: 10
74+
75+
redis_scheme: tcp
76+
redis_host: localhost
77+
redis_port: 6379
78+
redis_path: null
79+
redis_password: null
80+
81+
sentry_dsn: null
82+
EOF
83+
chown -R www-data:www-data /opt/wallabag
84+
msg_ok "Configured Wallabag"
85+
86+
msg_info "Installing Wallabag (Patience)"
87+
export COMPOSER_ALLOW_SUPERUSER=1
88+
export SYMFONY_ENV=prod
89+
cd /opt/wallabag
90+
$STD php bin/console wallabag:install --env=prod --no-interaction
91+
$STD php bin/console cache:clear --env=prod
92+
chown -R www-data:www-data /opt/wallabag
93+
chmod -R 755 /opt/wallabag/{var,web/assets}
94+
msg_ok "Installed Wallabag"
95+
96+
msg_info "Configuring Nginx"
97+
cat <<'EOF' >/etc/nginx/sites-available/wallabag
98+
server {
99+
listen 8000;
100+
server_name _;
101+
root /opt/wallabag/web;
102+
103+
add_header X-Frame-Options "SAMEORIGIN";
104+
add_header X-Content-Type-Options "nosniff";
105+
106+
index app.php;
107+
charset utf-8;
108+
109+
location / {
110+
try_files $uri /app.php$is_args$args;
111+
}
112+
113+
location ~ ^/app\.php(/|$) {
114+
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
115+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
116+
include fastcgi_params;
117+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
118+
fastcgi_param DOCUMENT_ROOT $realpath_root;
119+
internal;
120+
}
121+
122+
location ~ \.php$ {
123+
return 404;
124+
}
125+
126+
location ~ /\.(?!well-known).* {
127+
deny all;
128+
}
129+
130+
error_log /var/log/nginx/wallabag_error.log;
131+
access_log /var/log/nginx/wallabag_access.log;
132+
}
133+
EOF
134+
135+
ln -sf /etc/nginx/sites-available/wallabag /etc/nginx/sites-enabled/
136+
rm -f /etc/nginx/sites-enabled/default
137+
$STD systemctl reload nginx
138+
msg_ok "Configured Nginx"
139+
140+
msg_info "Enabling Services"
141+
systemctl enable -q --now redis-server
142+
systemctl enable -q --now php8.3-fpm
143+
systemctl enable -q --now nginx
144+
msg_ok "Enabled Services"
145+
146+
motd_ssh
147+
customize
148+
cleanup_lxc

0 commit comments

Comments
 (0)