Bookstack database issues

Can you post your compose for both containers and the .env file? I need to reproduce locally

Thanks

I changed the mysql user and root passwords here then ran through all the same stuff from above and it behaved exactly the same.

$ sudo awk -F= '/DB_PASS/ {print $NF}' /opt/docker/bookstack/data/config/www/.env .env
c36noa$w9C5B!3V!42#8Bc$i
c36noa$w9C5B!3V!42#8Bc$i

.env

PUID=1002
PGID=1002
TZ=America/Phoenix
APP_URL=http://10.10.2.20:6875
DB_PORT=3306
DB_HOST=bookstack-db
DB_USER=bookstack
DB_PASS=c36noa$w9C5B!3V!42#8Bc$i
DB_DATABASE=bookstackapp
MYSQL_ROOT_PASSWORD=SGr8m$@#@^6TUqh794MwajQ

docker-compose.yml

---
version: "2"
services:
  bookstack:
    hostname: bookstack
    image: lscr.io/linuxserver/bookstack
    container_name: bookstack
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - APP_URL=${APP_URL}
      - DB_HOST=${DB_HOST}
      - DB_PORT=${DB_PORT}
      - DB_USER=${DB_USER}
      - DB_PASS=${DB_PASS}
      - DB_DATABASE=${DB_DATABASE}
      - TZ=${TZ}
    volumes:
      - /opt/docker/bookstack/data/config:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - bookstack-db
  bookstack-db:
    hostname: bookstack-db
    image: lscr.io/linuxserver/mariadb
    container_name: bookstack-db
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - TZ=${TZ}
      - MYSQL_DATABASE=${DB_DATABASE}
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASS}
    volumes:
      - /opt/docker/bookstack/data/config:/config
    restart: unless-stopped

Ugh: https://laracasts.com/discuss/channels/laravel/beware-in-env-files
Will fix shortly

1 Like

Ahh F word. I’d gone the quoting route after seeing a post from the bookstack dev about quoting those variables. That was before I knew this image was pulling it out with that sed command and never put 2 and 2 together.

Confirmed working after pulling the latest version. At least this is fixed for future installs. Thanks for your work on this!

2 Likes

Thanks for the detailed report that allowed us to diagnose