Skip to content
Discussion options

You must be logged in to vote

You've found the right file. There are two separate things going on.

1. SERVER_PORT doesn'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. Your SERVER_PORT variable is overridden. Leave the container port at 10825 and change only the host side of the mapping. That's what docker/docker-compose.yml is set up for:

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 …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@muslimpribadi
Comment options

@GgauravJ05
Comment options

@muslimpribadi
Comment options

Answer selected by muslimpribadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants