Closed underfisk closed 1 year ago
I'm not an AWS user but let me just clarify something. You will need a web server to server the site. The FPM image only serves the PHP. You cab't hit port 9000 on the FPM image and get a web page.
Which web server is serving the site when you use the FPM image.
Hey, thanks for the quick reply I did use the Apache image which is suppose to serve but even so attaching a healthz check always hang up the socket connection On the other side the trusted proxies doesn't work with the domain name as expected Ideally shipping a single docker image with nginx and the php fpm/cgi would do the trick because a fargate task should be reachable through TCP/HTTP Again when using AWS my main goal is to leverage its Application Load Balancer but in order for that to happen the kimai container should be able to serve its content and accept any host/proxy as Synfony docs stand when using a reverse proxy Locally the docker image works, apache or fpm, in Fpm it will always resolve ok since the host is under the same network (in prod I can't release a docker swarm so 😅) Let me know if this context does help
Bundling the nginx into the fpm container isn't considered good docker practice. We are unlikely to provide that out of the box.
You could easily extend the base image though, something like this:
FROM kimai/kimai2:fpm
RUN apk add --no-cache nginx
# Do some nginx config
ENTRYPOINT /some-shell-script # Starts nginx and then starts kimai /startup.sh
Describe the bug Currently, i'm trying to configure (using Pulumi) Kimai2 to run inside an ECS (fargate task). I've tried to provide
kimai/kimai2:apache
andkimai/kimai2:latest
and only the apache was able to be accessible through the public fargate task IP. I've come across a situation where theFPM
is supposed to expose correctly port9000
but the target group always times out and never binds correctly which the public IP does not respond too. It might be a known issue but using a dummynginx
with port9000
does attach just fine. Trusted Hosts and Proxies are confused when we have a load balancer already, it's hard to predict its IP since we only have up-front the DNS to injectFor
TRUSTED_HOSTS
andTRUSTED_PROXIES
i've been passing"${APP_DOMAIN},nginx,localhost,127.0.0.1"
where the APP_DOMAIN would be just the DNSmyapp.com
I do believe the problem might be lying in the reserve proxy settings when passingTRUSTED
(https://symfony.com/doc/current/deployment/proxies.html#but-what-if-the-ip-of-my-reverse-proxy-changes-constantly) but using127.0.0.1,REMOTE_ADDR
doesn't work and the target will always detach even with a large amount ofhealthz
intervalTo Reproduce
9000
will time out)Desktop (please complete the following information):
Docker compose file (with passwords redacted) The official compose (works fine locally but can't deploy swarm/compose files to AWS)
Additional context Here's some logs when the task boots