Files
templates/blueprints/wallabag/docker-compose.yml
Mauricio Siu 65a9a0a5a5 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 <noreply@anthropic.com>
2026-07-08 01:37:02 -06:00

65 lines
2.0 KiB
YAML

version: "3.8"
services:
wallabag:
image: wallabag/wallabag:2.6.14
restart: unless-stopped
expose:
- "80"
depends_on:
wallabag-db:
condition: service_healthy
wallabag-redis:
condition: service_healthy
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=wallabag-db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=${SYMFONY__ENV__DATABASE_PASSWORD}
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__DATABASE_TABLE_PREFIX=wallabag_
- SYMFONY__ENV__MAILER_DSN=smtp://127.0.0.1
- 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
wallabag-db:
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}
volumes:
- wallabag-db-data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 20s
timeout: 5s
retries: 10
wallabag-redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- wallabag-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 20s
timeout: 5s
retries: 10
volumes:
wallabag-images:
wallabag-db-data:
wallabag-redis-data: