Closed DarkSirrush closed 3 months ago
Please note this report is in large part so that anyone else confused can see the issue/fix for reference.
So what's interesting here is that traefic is suppose to use the first exposed port, when none is defined in the docker-compose. In our case this is 8080 in the Dockerfile:
# Expose ports and start
EXPOSE 8080
EXPOSE 6379/tcp
Exposed Ports: If no specific label is set, Traefik will look at the ports exposed by the container. It will use the first exposed port it finds. In Docker, this is typically defined in the EXPOSE directive in the Dockerfile or through the --expose option in the run command. Default Behavior: If multiple ports are exposed and no specific label is provided, Traefik will generally pick the first exposed port listed in the container metadata.
RomM version rommapp/romm:latest
Describe the bug When relying on Traefik's port autodiscovery, Traefik incorrectly finds the redis port (6379) instead of the exposed port (8080).
This was tested using both the 'Ports' and the 'Expose' options for docker-compose.
To Reproduce Steps to reproduce the behavior:
Expected behavior For the reverse proxy to use the user-exposed port of 8080, instead of the application exposed port of 6379.
Screenshots
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A
Additional context Manually setting the correct port with Traefik works, but should not be necessary. I suspect that the method used of using internally (non-user configured) docker containers confuses Traefik in regards to which port is actually exposed.