-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] dotenv file values are not set according to the Docker configuration file #240
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
I'm having the same issue, also on a fresh install of the latest bookstack image. |
Nothing is "buggy", we switched to defaulting to environment variable-based configuration a while ago. If you had an existing .env we didn't touch it but otherwise we no longer use it and simply copy the example file to /config/www/.env . If you wish to use the .env file as your means of configuration you can add settings to it yourself but note that any environment variables you've set will supersede the values in the .env file. The specific issue OP is having is due to not following the current readme (presumably copy/pasting from an existing install) and therefore not setting all of the required environment variables. |
Thank you for responding. It sounds like the problems is with the |
No, you can just add it as an environment variable as with all the others: https://github.com/linuxserver/docker-bookstack?tab=readme-ov-file#parameters
|
Right, that means I first run Shouldn't this step be done automatically by the install script? |
It's generally unwise for us to invisibly generate keys used for encryption or other security purposes because users are then unaware of them. We also try and avoid manipulating text files because it gets increasingly difficult to modify things over time. Bookstack is one of our oldest images so did a lot of things in undesirable ways; we've made an effort to go back and modernise these old images to bring them in line with how we build new images, but doing it without breaking existing installs for users involves some compromises. |
That makes sense, thank you. It might be helpful to add a more explicit warning about this to the README, the only explanation about |
Unless otherwise specified (such as Leaving settings blank will usually result in an error either from the application itself, or that we generate in the container logs if it wouldn't otherwise be obvious what was missing. |
Thanks for clarification. But as long as people encounter issues, it's considered buggy; even if it is just inadequate documentation. |
People not reading, or misunderstanding, documentation is not a bug and we're not going to redefine terms. I will see if I can find a way to reword things to make it unambiguous that you're supposed to provide values for all the settings we say you need to provide values for. |
Is there an existing issue for this?
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
orghcr.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
.env
fileEnvironment
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
The text was updated successfully, but these errors were encountered: