Container restart installation fix and authentication support#2
Container restart installation fix and authentication support#2RalfHerzog wants to merge 10 commits intofkoester:masterfrom
Conversation
|
Hi @RalfHerzog, thanks for your input! I switched my live installation to your branch, rebuilt the docker image but the container won't start: Do I have to perform some migration steps? |
|
There seems to be a problem with starting the apache web server. I did not actually do any migration. My test from today on a windows machine was successful (just replaced the mariadb volume path with a docker volume). On my Ubuntu PC I was able to run the container too. So I did not know where the issue comes from. My commands are: git clone https://github.com/fkoester/docker-kimai.git
cd docker-kimai/
git fetch origin pull/2/head:pr
git checkout pr
docker-compose build
docker-compose up
# => Navigate to http://localhost:8080/installer/index.php |
There was a problem hiding this comment.
I had some time to take a closer look at your PR now. I think you have two great enhancements for this docker setup, which are:
- LDAP authentication support
- Persistent configuration
I would be happy to integrate those improvements but I am not fully convinced by your current PR for the following reasons:
-
It does too many things at once, please provide separate PRs for each enhancement above.
-
I do not like the idea of having to set an environment variable (
KIMAI_REMOVE_INSTALLATION) for an one time action. Either the installer should be removed automatically after successful installation or I would just stick with the command documented in theREADME. -
Also, please don't change from
imagetobuildin thedocker-compose.yamlor remove the tag from mariadb image.If you want to use own values for those parameters in your setup, you can use a custom configuration file which overwrites only the different parameters. Load this file by setting
COMPOSE_FILE=docker-compose.yaml:my-docker-compose.yaml(for example in.env).
docker-volume.yaml specifies the hostname of the database container as "database". The documentation however, instructs to use "db" to connect to that host/container.
Fix typo in README.md
Hi @fkoester, at first thanks for the well prepared Docker sources.
I just needed to configure kimai with a LDAP authentication and so updated the Docker files accordingly. On my way I found that the
autoconf.phpis not persistent and after a container restart kimai assumes not to be installed. This is now fixed.Unfortunately the setup got a little bit more complex. Due to the fact, kimai checks for presence of the
autoconf.phpto know if its installed already, I had to build a workaround for this file. The installation setup must be started manually because kimai thinks it is installed already (but it isn't).Further, I want to generalize the authentication methods from here. They are supported with the
KIMAI_AUTHENTICATORenvironment variable to select the authentication, andauth.phpprovides the additional configuration (as in the docs).To migrate the "remove installer/ directory" warning after login, I added the
KIMAI_REMOVE_INSTALLATIONenvironment variable. If set to '1' theinstaller/directory will be removed on container start.