From 65a9a0a5a5f9bb5d626b254f4a65deed78ec2ee9 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 8 Jul 2026 01:37:02 -0600 Subject: [PATCH] fix: let wallabag entrypoint provision the database so the install runs The template deployed but returned a persistent HTTP 500: MARIADB_DATABASE pre-created the wallabag database, so the image entrypoint detected an existing database, skipped bin/console wallabag:install and left an empty schema. Only MARIADB_ROOT_PASSWORD is set now, letting the entrypoint create the database/user and run the installer on first boot (matching the official wallabag docker-compose). Also: - build SYMFONY__ENV__DOMAIN_NAME from the generated domain with the http scheme so assets/redirects match how the domain is served - point SYMFONY__ENV__REDIS_HOST at the wallabag-redis service (default is 'redis', which does not resolve here) - randomize SYMFONY__ENV__SECRET instead of relying on the image's hardcoded default Co-Authored-By: Claude Fable 5 --- blueprints/wallabag/docker-compose.yml | 9 ++++++--- blueprints/wallabag/template.toml | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/blueprints/wallabag/docker-compose.yml b/blueprints/wallabag/docker-compose.yml index 890758cf..e4359cf4 100644 --- a/blueprints/wallabag/docker-compose.yml +++ b/blueprints/wallabag/docker-compose.yml @@ -25,6 +25,8 @@ services: - SYMFONY__ENV__FROM_EMAIL=${SYMFONY__ENV__FROM_EMAIL} - SYMFONY__ENV__DOMAIN_NAME=${SYMFONY__ENV__DOMAIN_NAME} - SYMFONY__ENV__SERVER_NAME=${SYMFONY__ENV__SERVER_NAME} + - SYMFONY__ENV__SECRET=${SYMFONY__ENV__SECRET} + - SYMFONY__ENV__REDIS_HOST=wallabag-redis volumes: - wallabag-images:/var/www/wallabag/web/assets/images @@ -32,10 +34,11 @@ services: image: mariadb:11.4 restart: unless-stopped environment: + # Only the root password is set on purpose: the wallabag entrypoint + # creates the database and user and runs `wallabag:install` itself. + # Pre-creating the database (MARIADB_DATABASE) makes the entrypoint + # skip the install, leaving an empty schema and a persistent HTTP 500. - MARIADB_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - - MARIADB_DATABASE=wallabag - - MARIADB_USER=wallabag - - MARIADB_PASSWORD=${SYMFONY__ENV__DATABASE_PASSWORD} volumes: - wallabag-db-data:/var/lib/mysql healthcheck: diff --git a/blueprints/wallabag/template.toml b/blueprints/wallabag/template.toml index 5153ab07..5094139e 100644 --- a/blueprints/wallabag/template.toml +++ b/blueprints/wallabag/template.toml @@ -2,6 +2,7 @@ main_domain = "${domain}" db_root_password = "${password:32}" db_password = "${password:32}" +app_secret = "${password:32}" from_email = "wallabag@example.com" [config] @@ -13,6 +14,7 @@ host = "${main_domain}" [config.env] MYSQL_ROOT_PASSWORD = "${db_root_password}" SYMFONY__ENV__DATABASE_PASSWORD = "${db_password}" -SYMFONY__ENV__DOMAIN_NAME = "https://${main_domain}" +SYMFONY__ENV__DOMAIN_NAME = "http://${main_domain}" SYMFONY__ENV__FROM_EMAIL = "${from_email}" SYMFONY__ENV__SERVER_NAME = "wallabag" +SYMFONY__ENV__SECRET = "${app_secret}"