Skip to content

Container restart installation fix and authentication support#2

Open
RalfHerzog wants to merge 10 commits intofkoester:masterfrom
RalfHerzog:master
Open

Container restart installation fix and authentication support#2
RalfHerzog wants to merge 10 commits intofkoester:masterfrom
RalfHerzog:master

Conversation

@RalfHerzog
Copy link

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.php is 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.php to 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_AUTHENTICATOR environment variable to select the authentication, and auth.php provides the additional configuration (as in the docs).

To migrate the "remove installer/ directory" warning after login, I added the KIMAI_REMOVE_INSTALLATION environment variable. If set to '1' the installer/ directory will be removed on container start.

@fkoester
Copy link
Owner

Hi @RalfHerzog,

thanks for your input! I switched my live installation to your branch, rebuilt the docker image but the container won't start:

kimai_1  | [Mon Sep 18 07:52:33.447472 2017] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down

Do I have to perform some migration steps?

@RalfHerzog
Copy link
Author

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

@fkoester fkoester self-requested a review September 24, 2017 15:52
Copy link
Owner

@fkoester fkoester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the README.

  • Also, please don't change from image to build in the docker-compose.yaml or 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).

RalfHerzog and others added 5 commits September 13, 2018 20:13
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants