coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: port expose discrepancy between docker image based deploys and docker compose based deploys

Open RayBB opened this issue 1 year ago • 2 comments

Description

There is an issue with exposing ports via docker compose.

Note: I expose the port manually because the dockerfile doesn't expose the port I want (5800). It exposes another instead.

Thanks for taking the time to read this and make coolify. It is really awesome and has inspired me to selfhost more. For some context: on this issue, I would like to submit jdownloader as a coolify service template but I'm struggling to get it working using docker compose when the docker image works fine.

Minimal Reproduction (if possible, example repository)

If I make a new resource based on an existing docker image with the image set to jlesage/jdownloader-2 and the "Ports Exposes" set to 5800 then jdownloader works fine when I hit open application. I get a url like https://is8wksg.mydomain.com/ and only that url.

However, if I create a docker compose based resource like so:

services:
  jdownloader-2:
    image: jlesage/jdownloader-2
    ports:
      - '5800'
    environment:
      - SERVICE_FQDN_JD

Then the app has two urls https://mydomain.com:5800/ and https://jd-jckco08.mydomain.com/ However, the :5800 url says Unable to connect and the other url says Bad Gateway.

Ideally, the 5800 one shouldn't be exposed in the first place but also I have no idea why neither url works.

Two question/problems:

  • Why is https://mydomain.com:5800/ exposed with the docker compose deploy but not the docker image deploy?
  • Why does the docker compose deploy have a bad gateway when the docker image deploy doesn't?

Exception or Error

No response

Version

v4.0.0-beta.200

RayBB avatar Jan 29 '24 12:01 RayBB

hey, did you figure this? having a similar issue

mejiasd3v avatar Mar 07 '24 15:03 mejiasd3v

Nope. It's the only thing stopping me from adding a new template. Maybe @andrasbacsai knows a work around?

RayBB avatar Mar 07 '24 21:03 RayBB