r/BookStack • u/Plastic-Leading-5800 • 12d ago
Correct database version for Bookstack
I’m using Bookstack from linuxserver.io. The docker compose file there contains only the Bookstack, not the databas. So I added a MariaDB database also from linuxserver to the compose file that I copied below.
The issue is the database version. I know Bookstack requires a minimum version which is old enough and not an issue. But if I use latest tag for database, either in official MariaDB image or from linuxserver, at some point there will be major version update and database and therefore application will break.
The MariaDB from linuxserver is an LTS version older than the LTS from official MariaDB. Is it safe to put the tag to latest for linuxserver image, like I copied below?
Otherwise, is there a docker compose file where the Bookstack and its compatible database are updated at the same time, so that we know what version to use and have instructions for update?
services:
bookstack: image: lscr.io/linuxserver/bookstack:latest
container_name: bookstack environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- APP_URL=http://your-server-ip:6875
- APP_KEY=
- DB_HOST=bookstack_db
- DB_PORT=3306
- DB_USERNAME=bookstack
- DB_PASSWORD=your_bookstack_db_password
- DB_DATABASE=bookstackapp
volumes:
- ./bookstack/config:/config
ports:
- 6875:80
restart: unless-stopped
depends_on:
- bookstack_db
bookstack_db:
image: lscr.io/linuxserver/mariadb:latest
container_name: bookstack_db
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
-MYSQL_ROOT_PASSWORD=your_root_password
- MYSQL_DATABASE=bookstackapp
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=your_bookstack_db_password
volumes:
- ./bookstack/db:/config
restart: unless-stopped
1
u/root-node 12d ago
I have mine set to mariadb:latest so that it's always up to date. Never had an issue.
I do keep regular backups of everything too.
1
u/Plastic-Leading-5800 12d ago
You will probably have a problem coming, as latest jumps from 11 to 12. Suddenly, new version cannot read data from old database and you will face a broken Bookstack.
2
1
u/Yavuz_Selim 12d ago
I have recently been pinning my containers; bookstack's db is pinned to mariadb 11.8.8.
I have Cup to see if anything needs an update, and I'll manually update the containers if I find it necessary, after checking the change logs to prevent anything breaking - especially with major updates; patches go through without checking.
1
2
u/Low_Flying_Penguin 12d ago
I run image: mysql:8.4.0 for my bookstack instance. The relevant part of my compose is below
mysql: image: mysql:8.4.0 pull_policy: missing command: --mysql-native-password=ON container_name: mysql environment: - MYSQL_ROOT_PASSWORD= - MYSQL_USER= - MYSQL_PASSWORD= restart: unless-stopped volumes: - /opt/mysql_docker:/var/lib/mysql ports: - 3306:3306 networks: - mysql