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.49k stars 586 forks source link

[BUG] Config dir emtpy when using Docker bind mount #2557

Closed LufinityLucas closed 3 months ago

LufinityLucas commented 3 months ago

What set up are you using

Describe the bug When running Leantime as a Docker container and using a bind mount for the config directory (possible even when using Docker volume), the config directory is empty.

To Reproduce Start a Docker container using e.g., docker run -d -p 8080:80 -v C:\Docker\leantime\config:/var/www/html/config leantime/leantime:latest.

Expected behavior The example files in the conf directory should be present in the mounted folder. The /start.sh script tries to copy the example configuration file, but fails as it does not exist.

Leantime Version 3.1.4

Server Docker Desktop on Windows

marcelfolaron commented 3 months ago

You'll need to mount the config folder after the start script was successful. Otherwise it won't have the correct permissions to write to it.

This is expected behavior. Also keep in mind that if you are using an .env file as part of your docker-compose you wouldn't see any config files as these are part of the docker environment at that point and wouldn't need to be written to a file

LufinityLucas commented 3 months ago

You'll need to mount the config folder after the start script was successful. Otherwise it won't have the correct permissions to write to it.

This is expected behavior. Also keep in mind that if you are using an .env file as part of your docker-compose you wouldn't see any config files as these are part of the docker environment at that point and wouldn't need to be written to a file

Thanks for the info!

I'm used to several other images that creates any missing files automatically. I have for now my own built making a copy of the conf folder during the build process, and then I have altered the /start.sh to copy the files from the copied conf folder to the correct one. Then the normal procedure copying the example file works.