version: "3.9"

services:
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
    image: localstack/localstack:1.4
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      DEBUG: ${DEBUG-}
      LAMBDA_EXECUTOR: ${LAMBDA_EXECUTOR-}
      DOCKER_HOST: unix:///var/run/docker.sock
    volumes:
      - ./volumes/localstack/lib:/var/lib/localstack
      - /var/run/docker.sock:/var/run/docker.sock