Leantime / leantime

Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind.
https://leantime.io
GNU Affero General Public License v3.0
4.74k stars 597 forks source link

[Bug]: Docker secrets (with var _file) does not work anymore #2788

Open goegol opened 4 days ago

goegol commented 4 days ago

What is your set up?

Cloud Hosted

Version

3.3.0

Describe the issue

When i try version 3.2.x and 3.3.0 i got the error Cannot connect to database in browser. When i do the downgrade to 3.1.4, every thing works fine. When i check the logs of my database i see that leantime tried to login without an password. 2024-11-03 14:36:09 3 [Warning] Access denied for user 'leantime'@'10.0.7.11' (using password: NO) In my docker-compose im using the option LEAN_DB_PASSWORD_FILE (so as described in manual).

See also my note in bug https://github.com/Leantime/leantime/issues/2735

When i do a downgrade to 3.1.4, every thing is working fine again.

Reproduction steps

  1. Spinup leantime 3.2.x or 3.3.0
  2. Use docker swarm with secrets support.
  3. use the env var: LEAN_DB_PASSWORD_FILE
  4. Leantime cant connect to db

Additional Notes

Please let me know if i can assist with testing.

marcelfolaron commented 3 days ago

Just to confirm it sounds like you are using docker swarm? I have not tested the set up in docker swarm and have limited knowledge about the underlying infrastructure.

What are you referring to with this string LEAN_DB_PASSWORD_FILE ? Are you referring to the environment file or the environment variable? In the docker compose file we ship with docker the filename is .env https://github.com/Leantime/docker-leantime/blob/master/docker-compose.yml

If you are referring to the password variable for the database however it should be LEAN_DB_PASSWORD (no _file at the end). The full list of env variables is in our samples file: https://github.com/Leantime/docker-leantime/blob/master/sample.env