From 7810ca6255ce7ea91825fbe623a71798cddb616e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 3 Aug 2023 10:32:07 +0200 Subject: [PATCH 01/11] Change public registration to false by default --- README.md | 2 +- root/etc/wallabag/parameters.template.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 785038e..b021438 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Default login is `wallabag:wallabag`. - `-e SYMFONY__ENV__MAILER_DSN=...` (defaults to "smtp://127.0.0.1") - `-e SYMFONY__ENV__FROM_EMAIL=...`(defaults to "`wallabag@example.com`", the address wallabag uses for outgoing emails) - `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails) -- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration) +- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "false", enable or disable public user registration) - `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation) - `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-instance.wallabag.org`", the URL of your wallabag instance) - `-e SYMFONY__ENV__REDIS_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http)) diff --git a/root/etc/wallabag/parameters.template.yml b/root/etc/wallabag/parameters.template.yml index 27dab79..42a8333 100644 --- a/root/etc/wallabag/parameters.template.yml +++ b/root/etc/wallabag/parameters.template.yml @@ -23,7 +23,7 @@ parameters: twofactor_sender: ${SYMFONY__ENV__TWOFACTOR_SENDER:-no-reply@wallabag.org} # fosuser stuff - fosuser_registration: ${SYMFONY__ENV__FOSUSER_REGISTRATION:-true} + fosuser_registration: ${SYMFONY__ENV__FOSUSER_REGISTRATION:-false} fosuser_confirmation: ${SYMFONY__ENV__FOSUSER_CONFIRMATION:-true} # how long the access token should live in seconds for the API From c2b7c3bbd74e003eb493ffc76ed7041d48adcc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 21 Aug 2023 09:16:54 +0200 Subject: [PATCH 02/11] Fix test --- tests/test_login.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_login.py b/tests/test_login.py index 5a037de..adb6655 100644 --- a/tests/test_login.py +++ b/tests/test_login.py @@ -52,7 +52,6 @@ def test_accessing_login_page(wallabag_service): assert r.status_code == 200 assert 'Log in' in r.text assert 'Password' in r.text - assert 'Register' in r.text assert 'Username' in r.text From 4b00b7f383f372de7593be4c0b7483414e3a2e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 28 Aug 2023 10:27:16 +0200 Subject: [PATCH 03/11] Update Dockerfile to release 2.6.5 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e7f960..81451bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ FROM alpine:3.18 COPY --from=builder /go/bin/envsubst /usr/bin/envsubst -ARG WALLABAG_VERSION=2.6.4 +ARG WALLABAG_VERSION=2.6.5 RUN set -ex \ && apk add --no-cache \ From d7e49fbda9cb7284fc2205b797f7cbe0975b197e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Benoist?= Date: Mon, 28 Aug 2023 10:35:58 +0200 Subject: [PATCH 04/11] Revert "Update Dockerfile to release 2.6.5" --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 81451bb..6e7f960 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ FROM alpine:3.18 COPY --from=builder /go/bin/envsubst /usr/bin/envsubst -ARG WALLABAG_VERSION=2.6.5 +ARG WALLABAG_VERSION=2.6.4 RUN set -ex \ && apk add --no-cache \ From 75d1b96cc8dbc9fbe2bca4407b900257dc7de050 Mon Sep 17 00:00:00 2001 From: Chen BingXin Date: Sat, 9 Sep 2023 10:05:42 +0800 Subject: [PATCH 05/11] Support for gif. Add imagick extension to support gif. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6e7f960..1804445 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,7 @@ RUN set -ex \ s6 \ tar \ tzdata \ + php81-pecl-imagick --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ && ln -sf /usr/bin/php81 /usr/bin/php \ && ln -sf /usr/sbin/php-fpm81 /usr/sbin/php-fpm \ && rm -rf /var/cache/apk/* \ From e7b0f9c7f69566c94ba1a01aade1ea93c29e986f Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Tue, 12 Sep 2023 20:01:17 +0200 Subject: [PATCH 06/11] Use php81-pecl-imagick from default repository Signed-off-by: Kevin Decherf --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1804445..0d3dbcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ RUN set -ex \ php81-mbstring \ php81-openssl \ php81-pecl-amqp \ + php81-pecl-imagick \ php81-pdo_mysql \ php81-pdo_pgsql \ php81-pdo_sqlite \ @@ -54,7 +55,6 @@ RUN set -ex \ s6 \ tar \ tzdata \ - php81-pecl-imagick --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ && ln -sf /usr/bin/php81 /usr/bin/php \ && ln -sf /usr/sbin/php-fpm81 /usr/sbin/php-fpm \ && rm -rf /var/cache/apk/* \ From 5bde344da35de6b0676699dc6f1472d5d637ad0c Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Tue, 15 Aug 2023 23:21:06 +0200 Subject: [PATCH 07/11] Use the release archive instead of the git archive --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0d3dbcf..4a67f5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,7 +66,7 @@ COPY --from=composer /usr/bin/composer /usr/local/bin/composer COPY root / RUN set -ex \ - && curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/archive/$WALLABAG_VERSION.tar.gz \ + && curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/releases/download/$WALLABAG_VERSION/wallabag-$WALLABAG_VERSION.tar.gz \ && tar xvf /tmp/wallabag.tar.gz -C /tmp \ && mkdir /var/www/wallabag \ && mv /tmp/wallabag-*/* /var/www/wallabag/ \ From c68fc98e5128a14ece06eef87199a727e6fd1584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20N=C3=A4sholm?= Date: Thu, 5 Oct 2023 20:20:45 +0200 Subject: [PATCH 08/11] Update nginx.conf to work with IPv6 --- root/etc/nginx/nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/root/etc/nginx/nginx.conf b/root/etc/nginx/nginx.conf index 4c896d0..2f499d3 100644 --- a/root/etc/nginx/nginx.conf +++ b/root/etc/nginx/nginx.conf @@ -36,6 +36,7 @@ http { server { listen 80; + listen [::0]:80; server_name _; root /var/www/wallabag/web; From 7c9d8a37e04f179552f5849eb4ae49935c0a9247 Mon Sep 17 00:00:00 2001 From: Neil McKenzie Date: Thu, 1 Feb 2024 08:53:52 +1100 Subject: [PATCH 09/11] Add restart: unless-stopped to example docker-compose Most example docker-compose files include restart: unless-stopped or restart: always. This being absent on Wallabag's example leads to unexpected downtime upon server restart --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b021438..97a0568 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ version: '3' services: wallabag: image: wallabag/wallabag + restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=wallaroot - SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql @@ -139,6 +140,7 @@ services: - redis db: image: mariadb + restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=wallaroot volumes: @@ -149,6 +151,7 @@ services: timeout: 3s redis: image: redis:alpine + restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 20s From e16d9e4113f11752497359f6c69aa6c7b1ee8e65 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 10 Mar 2024 16:20:26 +0100 Subject: [PATCH 10/11] doc: change docker-compose healthcheck target Signed-off-by: Kevin Decherf --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b021438..b69fdb8 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ services: volumes: - /opt/wallabag/images:/var/www/wallabag/web/assets/images healthcheck: - test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost"] + test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost/api/info"] interval: 1m timeout: 3s depends_on: From 9c6aca3b76bb1eed0fc29ed737034481f676aaac Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Sun, 10 Mar 2024 16:21:31 +0100 Subject: [PATCH 11/11] Fix SQLite provisioning If we use a local folder volume binding, install_wallabag was failing because of missing file and permission issues. This reworks the way we initially create the database when it is missing or empty. Superseeds #386 Fixes #316 #346 Signed-off-by: Kevin Decherf --- root/entrypoint.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/root/entrypoint.sh b/root/entrypoint.sh index 5aadb12..9bbfe99 100755 --- a/root/entrypoint.sh +++ b/root/entrypoint.sh @@ -23,6 +23,8 @@ install_wallabag() { provisioner() { SYMFONY__ENV__DATABASE_DRIVER=${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite} POPULATE_DATABASE=${POPULATE_DATABASE:-True} + SQLITE_DB_DIR="/var/www/wallabag/data/db" + SQLITE_DB_FILEPATH="$SQLITE_DB_DIR/wallabag.sqlite" # Replace environment variables envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml @@ -33,10 +35,17 @@ provisioner() { fi # Configure SQLite database - SQLITE_FILE_SIZE=$(wc -c "/var/www/wallabag/data/db/wallabag.sqlite" | awk '{print $1}') - if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ] && ([ ! -f "/var/www/wallabag/data/db/wallabag.sqlite" ] || [ "$SQLITE_FILE_SIZE" = 0 ]) ; then - echo "Configuring the SQLite database ..." - install_wallabag + if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ]; then + # mkdir and chown are mandatory for local folder binding + if [ ! -f "$SQLITE_DB_FILEPATH" ]; then + mkdir -p "$SQLITE_DB_DIR" + chown nobody: "$SQLITE_DB_DIR" + fi + + if [ ! -s "$SQLITE_DB_FILEPATH" ]; then + echo "Configuring the SQLite database ..." + install_wallabag + fi fi # Configure MySQL / MariaDB database