Closed XStylus closed 5 months ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
When the above variables are entered into "environment:" on docker-compose, it is expected that they be passed along to /config/www/.env.
That's not a valid expectation. Not sure where you read that.
The accepted env vars are listed in the readme. Apart from those, the upstream app may accept other vars, but I don't believe the app modifies the .env file to replace them with values from the environment.
The following variables are passed along to /config/www/.env
Is there a reason that the remaining variables are not?
My understanding might be very flawed. I just find it bizarre that select variables are passed yet other crucial variables are not.
@XStylus Likely because the container has custom handling for those options (options are not all the same as the env equivalents), and this somewhat aligns the DB option behaviour with many DB containers, where such env options only really apply for first boot with data persistence.
The options that are required to get the app up and running are handled by the container init and are listed in the readme.
How can you even get MAIL settings to work inside docker? I've tried setting them in docker-compse environment, and editing the /config/www/.env. Neither work.
The /config/www/.env shows my new settings.. I restart the container, and the settings are still there. But the WebGUI still shows it connecting to a different MAIL_HOST when I "Send a test email"
same issue for me, how do i set up mail sending in this bookstack-docker-image? At first i also tried to pass them via environment-option in docker-compose file, then i tried to manually add a .env file, but neither worked -> mail sending always tries to connect to localhost...
Can we get this fixed? Please don't put out another crappy, non-working Docker image (like all the others) with not enough features to even run it. Thanks
Just as an additional data point, just tested this and setting mail options within docker-compose.yml
environment works fine for me as expected.
```yml --- version: "2" services: bookstack: image: lscr.io/linuxserver/bookstack container_name: bookstack_oct_23 environment: - PUID=1000 - PGID=1000 - APP_URL=http://localhost:6875 - DB_HOST=bookstack_db - DB_PORT=3306 - DB_USER=bookstack - DB_PASS=mydbpass - DB_DATABASE=bookstackapp - MAIL_HOST=172.17.0.1 - MAIL_PORT=1025 - MAIL_USERNAME=null - MAIL_PASSWORD=null - MAIL_ENCRPYTION=null - MAIL_VERIFY_SSL=false - MAIL_FROM=test-lsio@example.com - MAIL_FROM_NAME="LSIO MAIL TESTING" volumes: - ./bookstack_app_data:/config ports: - 6875:80 restart: unless-stopped depends_on: - bookstack_db bookstack_db: image: lscr.io/linuxserver/mariadb container_name: bookstack_oct_23_db environment: - PUID=1000 - PGID=1000 - MYSQL_ROOT_PASSWORD=mydbpass - TZ=Europe/London - MYSQL_DATABASE=bookstackapp - MYSQL_USER=bookstack - MYSQL_PASSWORD=mydbpass volumes: - ./bookstack_db_data:/config restart: unless-stopped ```
Confirmed this is working. Thanks!
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
Is there an existing issue for this?
Current Behavior
The following docker-compose environment variables are not being passed to the Bookstack .env file at /config/www/.env:
Expected Behavior
When the above variables are entered into "environment:" on docker-compose, it is expected that they be passed along to /config/www/.env.
There is an undesirable workaround by way of using a separate .env file alongside the docker-compose file, or by manually editing the /config/www/.env file after installation.
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs