docs icon indicating copy to clipboard operation
docs copied to clipboard

[Question] External ports in docker-compose

Open emirot opened this issue 10 months ago • 2 comments

In the documentation here https://docs.localstack.cloud/getting-started/installation/

I can see that

services:
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
    image: localstack/localstack
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      # LocalStack configuration: https://docs.localstack.cloud/references/configuration/
      - DEBUG=${DEBUG:-0}
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

However I do not understand the purpose of the external-service port.

I tried and create and create a record in a kinesis stream and the only endpoint I could reach is 4566.

I have tried removing this line 127.0.0.1:4510-4559:4510-4559" relaunched, and it still worked.

So maybe it is just for some internals?

emirot avatar Feb 25 '25 05:02 emirot

@bentsku I would be happy to add that in the doc

emirot avatar Feb 27 '25 01:02 emirot

Hello @emirot,

This is the page in the documentation about External Service Port Range: https://docs.localstack.cloud/references/external-ports/

If you're only using Kinesis, you don't have to use it. It is used when LocalStack is starting services like RDS instances, or like the documentation mentions, OpenSearch.

bentsku avatar Feb 28 '25 10:02 bentsku