version: '3.8'

services:
  localstack:
    image: localstack/localstack:4.4
    ports:
      - "4566:4566"
    environment:
      - SERVICES=s3
      - DEBUG=0
      - DATA_DIR=/tmp/localstack/data
    volumes:
      - "/tmp/localstack:/tmp/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
      interval: 10s
      timeout: 5s
      retries: 5