From d51cc9fe336305e72cd664ae4d986cb03b8d7505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jun 2023 18:07:13 +0200 Subject: [PATCH 1/7] Update Dockerfile to 2.6.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 46bb521..b9834bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM alpine:3.17 COPY --from=builder /go/bin/envsubst /usr/bin/envsubst -ARG WALLABAG_VERSION=2.5.4 +ARG WALLABAG_VERSION=2.6.0 RUN set -ex \ && apk add --no-cache \ From 676572b8fe19acc8c065963144c3aba6e3411867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jun 2023 18:16:17 +0200 Subject: [PATCH 2/7] Update dependencies --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index b9834bf..1725db9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ php81-xmlreader \ php81-tidy \ php81-intl \ + php81-sodium \ mariadb-client \ postgresql14-client \ rabbitmq-c \ From 8bc63c22ecd66b169306a978d139fdc28b08825c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 21 Jun 2023 07:27:14 +0200 Subject: [PATCH 3/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1725db9..57485dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM alpine:3.17 COPY --from=builder /go/bin/envsubst /usr/bin/envsubst -ARG WALLABAG_VERSION=2.6.0 +ARG WALLABAG_VERSION=2.6.1 RUN set -ex \ && apk add --no-cache \ From b34d71355da56f8cbbdc4a7f4b49556943ec84dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Benoist?= Date: Wed, 21 Jun 2023 09:26:11 +0200 Subject: [PATCH 4/7] Relax composer We don't need a fixed version of Composer now (as we updated most packages on wallabag) --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 57485dc..7300f8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,6 @@ RUN set -ex \ && ln -sf /dev/stderr /var/log/nginx/error.log \ && curl -s https://getcomposer.org/installer | php \ && mv composer.phar /usr/local/bin/composer \ - && composer selfupdate 2.2.18 \ && rm -rf /root/.composer/* COPY root / From de07417e8f4f7cfc57b2258b27108b5c9a79195d Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 21 Jun 2023 09:56:30 +0200 Subject: [PATCH 5/7] Update domain name --- README.md | 4 ++-- root/etc/wallabag/parameters.template.yml | 2 +- tests/docker-compose.sqlite.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c49effd..d022166 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Default login is `wallabag:wallabag`. - `-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_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation) -- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-url-instance.com`", the URL of your wallabag instance) +- `-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)) - `-e SYMFONY__ENV__REDIS_HOST=...` (defaults to "redis", IP or hostname of the target server) - `-e SYMFONY__ENV__REDIS_PORT=...` (defaults to "6379", port of the target host) @@ -129,7 +129,7 @@ services: - SYMFONY__ENV__MAILER_USER=~ - SYMFONY__ENV__MAILER_PASSWORD=~ - SYMFONY__ENV__FROM_EMAIL=wallabag@example.com - - SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com + - SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-instance.wallabag.org - SYMFONY__ENV__SERVER_NAME="Your wallabag instance" ports: - "80" diff --git a/root/etc/wallabag/parameters.template.yml b/root/etc/wallabag/parameters.template.yml index 421ca8d..7a55ae5 100644 --- a/root/etc/wallabag/parameters.template.yml +++ b/root/etc/wallabag/parameters.template.yml @@ -10,7 +10,7 @@ parameters: database_socket: null database_charset: ${SYMFONY__ENV__DATABASE_CHARSET:-utf8} - domain_name: ${SYMFONY__ENV__DOMAIN_NAME:-https://your-wallabag-url-instance.com} + domain_name: ${SYMFONY__ENV__DOMAIN_NAME:-https://your-wallabag-instance.wallabag.org} mailer_transport: ${SYMFONY__ENV__MAILER_TRANSPORT:-smtp} mailer_user: ${SYMFONY__ENV__MAILER_USER:-~} diff --git a/tests/docker-compose.sqlite.yml b/tests/docker-compose.sqlite.yml index 74755d3..d505b89 100644 --- a/tests/docker-compose.sqlite.yml +++ b/tests/docker-compose.sqlite.yml @@ -11,7 +11,7 @@ services: - SYMFONY__ENV__DATABASE_PORT=~ - SYMFONY__ENV__DATABASE_NAME=symfony - SYMFONY__ENV__DATABASE_USER=root - - SYMFONY__ENV_DATABASE_PASSWORD=~ + - SYMFONY__ENV__DATABASE_PASSWORD=~ - SYMFONY__ENV__SECRET=F00B4R ports: - "127.0.0.1:80:80" From fb13655defdeb6ff1260488725aa4eacc28ff5e6 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 21 Jun 2023 10:45:24 +0200 Subject: [PATCH 6/7] Handle `mailer_dsn` --- README.md | 8 ++------ root/entrypoint.sh | 7 ++++--- root/etc/wallabag/parameters.template.yml | 8 +------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d022166..930d1ce 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,7 @@ Default login is `wallabag:wallabag`. - `-e SYMFONY__ENV__DATABASE_TABLE_PREFIX=...` (defaults to "wallabag_". Specifies the prefix for each database table) - `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv") - `-e SYMFONY__ENV__LOCALE=...` (default to en) -- `-e SYMFONY__ENV__MAILER_HOST=...` (defaults to "127.0.0.1", the SMTP host) -- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user) -- `-e SYMFONY__ENV__MAILER_PASSWORD=...`(defaults to "~", the SMTP password) +- `-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_AUTH=...` (defaults to "true", enable or disable two-factor authentication) - `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails) @@ -125,9 +123,7 @@ services: - SYMFONY__ENV__DATABASE_PASSWORD=wallapass - SYMFONY__ENV__DATABASE_CHARSET=utf8mb4 - SYMFONY__ENV__DATABASE_TABLE_PREFIX="wallabag_" - - SYMFONY__ENV__MAILER_HOST=127.0.0.1 - - SYMFONY__ENV__MAILER_USER=~ - - SYMFONY__ENV__MAILER_PASSWORD=~ + - SYMFONY__ENV__MAILER_DSN=smtp://127.0.0.1 - SYMFONY__ENV__FROM_EMAIL=wallabag@example.com - SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-instance.wallabag.org - SYMFONY__ENV__SERVER_NAME="Your wallabag instance" diff --git a/root/entrypoint.sh b/root/entrypoint.sh index 4215110..5aadb12 100755 --- a/root/entrypoint.sh +++ b/root/entrypoint.sh @@ -33,7 +33,8 @@ provisioner() { fi # Configure SQLite database - if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ] && [ ! -f "/var/www/wallabag/data/db/wallabag.sqlite" ] ; then + 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 fi @@ -87,9 +88,9 @@ provisioner() { } if [ "$COMMAND_ARG1" = "wallabag" ]; then - echo "Starting Wallabag ..." + echo "Starting wallabag ..." provisioner - echo "Wallabag is ready!" + echo "wallabag is ready!" exec s6-svscan /etc/s6/ fi diff --git a/root/etc/wallabag/parameters.template.yml b/root/etc/wallabag/parameters.template.yml index 7a55ae5..826b551 100644 --- a/root/etc/wallabag/parameters.template.yml +++ b/root/etc/wallabag/parameters.template.yml @@ -12,13 +12,7 @@ parameters: domain_name: ${SYMFONY__ENV__DOMAIN_NAME:-https://your-wallabag-instance.wallabag.org} - mailer_transport: ${SYMFONY__ENV__MAILER_TRANSPORT:-smtp} - mailer_user: ${SYMFONY__ENV__MAILER_USER:-~} - mailer_password: ${SYMFONY__ENV__MAILER_PASSWORD:-~} - mailer_host: ${SYMFONY__ENV__MAILER_HOST:-127.0.0.1} - mailer_port: ${SYMFONY__ENV__MAILER_PORT:-25} - mailer_encryption: ${SYMFONY__ENV__MAILER_ENCRYPTION:-~} - mailer_auth_mode: ${SYMFONY__ENV__MAILER_AUTH_MODE:-~} + mailer_dsn: ${SYMFONY__ENV__MAILER_DSN:-smtp://127.0.0.1} locale: ${SYMFONY__ENV__LOCALE:-en} From a025d243d17008f20a8e20533b9781c004151605 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 21 Jun 2023 13:39:51 +0200 Subject: [PATCH 7/7] Fix mariadb launch --- tests/docker-compose.mariadb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker-compose.mariadb.yml b/tests/docker-compose.mariadb.yml index d5dfc31..12424a9 100644 --- a/tests/docker-compose.mariadb.yml +++ b/tests/docker-compose.mariadb.yml @@ -18,6 +18,6 @@ services: - "127.0.0.1:80:80" db: image: mariadb - command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE + command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE environment: - MYSQL_ROOT_PASSWORD=wallaroot