Repository navigation
[Question] How to use custom port? #2999
Chat2DB editionCommunity Delivery modeDocker Chat2DB versionChat2DB Community 5.3.7 EnvironmentFedora 44 QuestionWhat is the right way to use custom port besides 10825? I'm trying See What have you tried?using env. var SERVER_PORT in podman/docker. Sanitized logs or screenshotsNo response Before posting
|
Replies: 1 comment 3 replies
|
You've found the right file. There are two separate things going on. 1. ports:
- "${CHAT2DB_BIND_ADDRESS:-127.0.0.1}:${CHAT2DB_PORT:-10825}:10825"2. The CORS filter then rejects the new port. That's the 403 you're seeing. In Community mode, "http://127.0.0.1:8888", "http://localhost:8888", "http://127.0.0.1:8889",
"http://127.0.0.1:10825", "http://localhost:10825"Any request carrying a different What works without rebuilding:
The proper fix is upstream: make the allowlist configurable, or derive it from the configured port. Given that compose already offers |
You've found the right file. There are two separate things going on.
1.
SERVER_PORTdoesn't change anything inside the container. The image's entrypoint (docker/Dockerfile) starts Java with-Dserver.port=10825. In Spring Boot's externalized configuration order, Java system properties take priority over OS environment variables, so the app keeps listening on 10825. YourSERVER_PORTvariable is overridden. Leave the container port at 10825 and change only the host side of the mapping. That's whatdocker/docker-compose.ymlis set up for:2. The CORS filter then rejects the new port. That's the 403 you're seeing. In …