Just did an upgrade for Wallabag from Version 2.3.8 to 2.4.2. So I opened my docker-compose.yml and changed the image version and ran docker-compose up -d
version: '3'
services:
wallabag:
image: wallabag/wallabag:2.4.2
container_name: wallabag-app
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_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=${MARIADB_USER}
- SYMFONY__ENV__DATABASE_PASSWORD=${MARIADB_PASSWORD}
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__MAILER_HOST=${WALLABAG_MAILER_HOST}
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=${WALLABAG_FROM_EMAIL}
- SYMFONY__ENV__DOMAIN_NAME=${WALLABAG_DOMAIN_NAME}
depends_on:
- wallabag-db
volumes:
- /opt/containers/wallabag/images:/var/www/wallabag/web/assets/images
networks:
- proxy
wallabag-db:
image: mariadb
restart: unless-stopped
container_name: wallabag-db
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
volumes:
- /opt/containers/wallabag/data:/var/lib/mysql
networks:
- proxy
networks:
proxy:
external: true
But somehow after the upgrade my container won’t come back online. Although the log was saying “Provisioner finished”, it could not connect to the database. When opening the webpage for wallabag the docker logs said: “…unable to parse the MySQL grant string: GRANT USAGE ON entrypoint.sh TO wallabag
@%
IDENTIFIED BY PASSWORD…”
After searching on google I finally found this note on the Wallabag Github page….
“If there is a version upgrade that needs a database migration. The most easy way to do is running the migrate
command:”
docker exec -t wallabag-app /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
After running the db migration everything came back online. So this post is just a reminder for myself that sometimes Wallabag needs a db migration after upgrading. 🙂