-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing server port cannot be done via settings.yaml #20
Comments
I can confirm this issue still persist as of now. |
I'm sorry for the delay. If you talk about the Caddy image, just change Caddy configuration since the network is the one from the host: searxng-docker/docker-compose.yaml Line 8 in ba1569d
If you talk about the SearXNG image, change this line: searxng-docker/docker-compose.yaml Line 43 in ba1569d
|
@dalf I was talking about the SearXNG image. searxng-docker/docker-compose.yaml Line 43 in ba1569d
only maps ports, it doesn't make the image communicate via a port other than 8080. I mean that I can use - "127.0.0.1:8080:9999" but the inner port that the container sends data through remains 8080 despite the outer port 9999 being exposed. The outer port 9999 will not transfer data on its own. A possible fix would be to amend export DEFAULT_BIND_ADDRESS="0.0.0.0:8080"
export BIND_ADDRESS="${BIND_ADDRESS:-${DEFAULT_BIND_ADDRESS}}" into export DEFAULT_BIND_ADDRESS="0.0.0.0:${BIND_PORT:-8080}"
export BIND_ADDRESS="${BIND_ADDRESS:-${DEFAULT_BIND_ADDRESS}}" and pass |
I don't understand the use case: since you can change the port mapping, when you do need to change the listening port inside the docker image? |
I pass this container's network via a vpn container. The vpn container then exposes ports to my local network. Another container (passed through the vpn container) uses internal port 8080 and cannot be changed. SearXNG and that other container cannot coexist. In case I am not clear, this is the port setup I would like but cannot achieve services:
vpn:
ports:
- 8080:8080 # Libreddit
- 8081:8080 # SearXNG
searxng:
network_mode: service:vpn Libreddit forces port 8080. SearXNG as well unless I use an undocumented environment variable (c.f. first post). This is not a major issue and I provided a hacky solution. The problem is that the documentation in settings.yaml is wrong, and I wanted to show away to do it, in case anyone else has the same issue. |
I could see that caddy was drying without any error when I tried shaping the port binding too !! |
I have mine on a dedicated IP, on Unraid via a MACVLAN and cannot hit the server on port 80. It's hard-coded to port 8080. This is nuts. |
This is still present. Playing around with it the only thing that worked was in Docker Compose placing:
Any variation in the settings.yaml had no effect on the bound port (default 8080). |
thank you for this. I'm one step closer now. |
I'm here for this exact same issue with the same 2 containers. Thanks for working on this ahead of me. |
The intended way to set the port when using Docker is to use the |
@Bnyro Shouldn't https://github.com/searxng/searxng/blob/master/searx/settings.yml be updated as well by removing the server:
# Is overwritten by ${SEARXNG_PORT} and ${SEARXNG_BIND_ADDRESS}
port: 8888 ? |
No, it's used by non-docker-deployments. |
Setting
in
settings.yaml
does not make the Docker container listen on 0.0.0.0:1234.Only setting
in
docker-compose.yaml
makes it work.settings.yaml
is not taken into account for the port, but there is a workaround.Does setting the
settings.yaml
port number do anything?EDIT: I found the workaround by looking at the entrypoint script of the Dockerfile https://github.com/searxng/searxng/blob/31521f3a465fa2beb7e3fd7ed47621262a28f554/dockerfiles/docker-entrypoint.sh#L26-L27:
The text was updated successfully, but these errors were encountered: