Leantime / docker-leantime

Official Docker Image for Leantime https://leantime.io
GNU Affero General Public License v3.0
190 stars 86 forks source link

added volumes #36

Closed dekiesel closed 2 years ago

dekiesel commented 3 years ago

Hi,

I changed start.sh and Dockerfile so that volumes can now be used.

I added a temporary folder /app in which leantime is extracted initially. The files are then first copied to /var/www/html in start.sh because this way, if the volume is empty the configuration files will be created on startup.

The issue with extracting to /var/www/html in the Dockerfile-build is that if you mount a volume to that folder or any subfolders it overwrites the files that are already there.

I also added a comment to docker-compose.yaml informing rpi/arm users that they need to use a differen mysql image.

This closes #35

I hope I didn't miss any contribution rules.

marcelfolaron commented 3 years ago

Thank you for the pull request. Will this handle the update case successfully? We noticed previously that mounting volumes will prevent leantime updates from happening successfully. This is fine for the userfiles but mounting public/ might cause issues?

dekiesel commented 3 years ago

You are right, this will prevent updates from happening, but I think I can work around that. I'll update the pr.

The issue is that if the config file exists the newer files won't be copied over. The script needs to check whether the leantime version in the container is higher than "local" version and then force an install if necessary.

dekiesel commented 3 years ago

Is configuration.php the only file that holds data that shouldn't change? If yes I'd propose that leantime itself is overwritten at every start, but configuration.php is only created/written if it doesn't exist.

marcelfolaron commented 2 years ago

Picking up the conversation on this PR again. Yes, configuration.php is the only file that shouldn't change.

marcelfolaron commented 2 years ago

Completed as part of a diffferent PR