Closed liayn closed 1 month ago
Thanks for your report!
Would you mind sharing your entire docker-compose.yaml ? I am currently updating the Docker docs and I have no example of a running FPM installation. The original maintainer left and now I a stuck with something I never used myself...
If you have any idea of how to improve the reported issue, I would be happy to discuss it.
Sure, but I can only add our mysql-service. We are running apache as reverse proxy natively, so this is not a pure docker-only setup.
If I had a solution ready, I would have pushed a PR; but I need to figure out how the healthcheck here is supposed to work.
services:
mysql84:
image: mysql:8.4
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somepassword
volumes:
- /opt/mysql/mysqlcustom.cnf:/etc/mysql/conf.d/mysqlcustom.cnf
- /opt/mysql/data:/var/lib/mysql
time:
image: kimai/kimai2:latest
restart: always
depends_on:
- mysql84
ports:
- "127.0.0.1:9000:9000"
environment:
- DATABASE_URL=mysql://kimai:redacted@mysql84/kimai?charset=utf8mb4&serverVersion=8.4
- TRUSTED_PROXIES=172.18.0.0/24
- TRUSTED_HOSTS=*
- MAILER_URL=smtp://mail.example.com
- MAILER_FROM=webmaster@example.com
- APP_SECRET=secret
volumes:
- /var/www/kimai/public:/opt/kimai/public
- /opt/kimai/data:/opt/kimai/var/data
- /opt/kimai/plugins:/opt/kimai/var/plugins
(If we would run the proxy in docker too, we would most likely either use "trafik" or "nginx" as proxy-service.)
@kevinpapst What's the correct route to access this action?
I suppose it is "/api/ping", but this redirects me to the login.
The command SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000
tries to contact the /ping
"endpoint". I'm not sure whether it exists actually. (Did inspect the PHP code close enough yet.)
If it should actually query the /api/ping
endpoint, this must be adjusted, but won't help if it requires a login.
Also, I'm not sure, what SCRIPT_NAME
and SCRIPT_FILENAME
is actually required by Symfony to resolve the requested action correctly.
I don't think that it is trying to reach the API. I think this is trying to check if PHP-FPM is available.
Search for ping.path
on this page: https://www.php.net/manual/en/install.fpm.configuration.php
Maybe that was activated in the past in the FPM default config and is now deactivated and therefor fails ... do we need to activate it with a sed
during image build?
This is probably an upstream bug that has been resolved "recently" https://github.com/php/php-src/commit/43bc53a73060002644240d6bf47f58a41eca0c55
Okay, default config is "not set" (https://github.com/php/php-src/blob/91a07e7b75e6a685334c1482d27e856bc0a0183f/sapi/fpm/www.conf.in#L286)
I wonder if this never worked or if this config vanished
History of this goes back a few years, so it either changed or never worked, we will never know.
In order to fix it, we need to activate the line you linked and this one is guess: https://github.com/php/php-src/blob/91a07e7b75e6a685334c1482d27e856bc0a0183f/sapi/fpm/www.conf.in#L369
Describe the problem
Using the FPM image, the docker logs show load of errors like
This is due to the health check in https://github.com/kimai/kimai/blob/40154be8f9354b185d6595249c421051d545f64d/.docker/Dockerfile.kimai-base#L127
Obviously this does not work as intended.
Describe your setup and add your Docker compose file (redact your credentials)
Kimai Version 2.22.0
Command used to run the container
No response