Incorrect docker-compose example on docker hub
The docker-compose example at https://hub.docker.com/r/wallabag/wallabag/ includes a MariaDB but the parameters are set to utf8 instead of utf8mb4 causing the infamous error message Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x91\x8F a...' for column 'content' at row 1
As stated in the doc: https://doc.wallabag.org/en/admin/parameters.html, MySQL must be set to utf8mb4 to handle emoji and other special characters.
Please add SYMFONY__ENV__DATABASE_CHARSET and db command to the example.
version: '3'
services:
wallabag:
image: wallabag/wallabag
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- [email protected]
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
ports:
- "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
db:
image: mariadb
command: --character_set_client=utf8 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag/data:/var/lib/mysql
redis:
image: redis:alpine
Related Issues:
- https://github.com/wallabag/wallabag/issues/3588
- https://github.com/wallabag/wallabag/issues/3527
- https://github.com/wallabag/wallabag/issues/2976
Should this not work out of the box? Copying and pasting the docker-compose.yml into your server modifying the domain settings and executing docker-compose up -d should likely be enough should it not if you're providing no further instructions?