Repository navigation
Expand file tree
/
Copy pathdocker-compose.localstack.yml
More file actions
63 lines (53 loc) · 1.92 KB
/
Copy pathdocker-compose.localstack.yml
File metadata and controls
63 lines (53 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
services:
localstack:
container_name: lowkey-localstack
image: localstack/localstack:3.0
ports:
- "4566:4566" # LocalStack Gateway
- "4510-4559:4510-4559" # external services port range
environment:
# LocalStack configuration
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- PERSISTENCE=${PERSISTENCE-0}
# AWS Services to enable
- SERVICES=secretsmanager,s3,iam
# Enable LocalStack Pro features if license is available
- LOCALSTACK_API_KEY=${LOCALSTACK_API_KEY-}
# AWS configuration
- AWS_DEFAULT_REGION=us-east-1
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
# Additional configuration
- SKIP_INFRA_DOWNLOADS=1
- EAGER_SERVICE_LOADING=1
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./tmp/localstack}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- lowkey-network
# Optional: AWS CLI container for easy testing
aws-cli:
container_name: lowkey-aws-cli
image: amazon/aws-cli:latest
depends_on:
- localstack
environment:
- AWS_DEFAULT_REGION=us-east-1
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- AWS_ENDPOINT_URL=http://localstack:4566
networks:
- lowkey-network
command: --version
profiles:
- tools # Only start when explicitly requested
networks:
lowkey-network:
driver: bridge
# Usage:
# Start LocalStack: docker-compose -f docker-compose.localstack.yml up -d
# Stop LocalStack: docker-compose -f docker-compose.localstack.yml down
# View logs: docker-compose -f docker-compose.localstack.yml logs -f localstack
# Start with AWS CLI tools: docker-compose -f docker-compose.localstack.yml --profile tools up -d
# Test connectivity: curl http://localhost:4566/_localstack/health