Skip to content

[BUG] dotenv file values are not set according to the Docker configuration file #240

Closed
@okaeiz

Description

@okaeiz

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have got the latest Bookstack version from Dockerhub and I use it in a Docker Compose configuration file to deploy Bookstack on a machine where no existing instance is available (I am therefore not updating my Bookstack, it's a fresh installation) so that the dotenv (.env) file is not present.

After the container deployment is complete, when I check the container files and the dotenv file is not populated. When I updated my existing bookstack instance (v24.05.4), it worked fine, possibly because of the presence of a dotenv file with values.

It seems like the Docker image (linuxserver/bookstack:24.10.20241028, linuxserver/bookstack:version-v24.10 or ghcr.io/linuxserver/bookstack:24.10.20241028) is buggy and cannot set the values (database credentials, API base key, etc.)

Expected Behavior

I expect the configuration file to set the environment variables upon container deployment.

Steps To Reproduce

  1. Get the newest image
  2. Fresh install a Bookstack instance
  3. Check the logs
  4. The first problem occurs because of API base key not being available
  5. Check the .env file
  6. It's empty!

Environment

- OS: Ubuntu Server 22.04
- Bookstack is deployed using Docker Compose

CPU architecture

x86-64

Docker creation

services:
  bookstack:
    # image: docker.io/linuxserver/bookstack:24.05.4
    image: docker.io/linuxserver/bookstack:24.10.20241028
    container_name: bookstack
    environment:
      PUID: 1000
      PGID: 1000
      APP_URL: http://my_url:6875
      DB_HOST: bookstack_db
      DB_USER: bookstack_user
      DB_PASS: db_password
      DB_DATABASE: bookstackdb

    volumes:
      - data:/config
    ports:
      - 6875:80
    restart: unless-stopped
    networks:
      - app-network

Container logs

An application key is missing, halting init!
You can generate a key with: docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions