1
0
mirror of https://github.com/wallabag/docker synced 2025-12-13 09:46:27 +00:00

Handle mailer_dsn

This commit is contained in:
Jeremy Benoist
2023-06-21 10:45:24 +02:00
parent de07417e8f
commit fb13655def
3 changed files with 7 additions and 16 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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}