Closed Yakrel closed 3 weeks ago
Hi @Yakrel,
The internal port bale runs on is static and doesn't have any mechanism to change currently. Although that shouldn't be necessary. I think you can change ports
to 8181:8080
to accomplish what you want. See the following for reference:
https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/
Sadly I need internal port to be changed too.
Hi @Yakrel , Can you describe your use case for this change? I am curious why you can't use the docker port remapping.
I have another app that using the ports and it is same as bale when I change port, it doesnt apply it, so I cant use both apps in same WM.
Are you utilizing docker or running bale in another configuration?
I am using both bale and other app via compose file so I am using docker.
Unless you can provide me a reason why you can't use the built in port remapping in Docker, I am hesitant to make any changes. This is a solved problem with Docker, we shouldn't be trying to reinvent the wheel. I can easily run multiple instances of bale in docker concurrently on different ports on the same host, you should be able to do the same with other applications:
version: "3.8"
services:
balex:
image: ghcr.io/natankeddem/bale:latest
ports:
- 8080:8080
volumes:
- /etc/localtime:/etc/localtime:ro
- ~/path/to/data/baledatax:/app/data
- ~/path/to/data/balelogsx:/app/logs
environment:
- PUID=1000
- PGID=1000
- VERBOSE_LOGGING=TRUE # Optional
baley:
image: ghcr.io/natankeddem/bale:latest
ports:
- 8181:8080
volumes:
- /etc/localtime:/etc/localtime:ro
- ~/path/to/data/baledatay:/app/data
- ~/path/to/data/balelogsy:/app/logs
environment:
- PUID=1000
- PGID=1000
- VERBOSE_LOGGING=TRUE # Optional
The problem is with the internal port, both application using same internal port so I have to choose between bale or other application to run.
Perhaps you can share your compose files and any errors you are getting. I just showed you multiple bale instances can run flawlessly on the same host and they obviously use the same non-published ports.
Hi @Yakrel,
for me, It seems that you misunderstand how docker containers are working. Unless bale and your other software are running inside the exact same container and have to be defined inside the Dockerfile for the image, this container is based on, your servers will never see the internal port of each other.
Defining two services inside of a docker-compose.yaml will create two containers - not one. They can only see the external port of the other!
So there will never be a conflict, even when two containers are using the same internal port, as long as they are mapped to different external ports.
Ty for your answers, yes I misunderstood it.
Hi, I did change port to 8181 but looks like bale still running on 8080,
Here is my docker compose file
and here my logs