-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
137 lines (127 loc) · 3.48 KB
/
Copy pathdocker-compose.yml
File metadata and controls
137 lines (127 loc) · 3.48 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Docker Compose for Local AWS Development with LocalStack
# Provides local AWS services for testing without incurring AWS costs
version: '3.8'
services:
# LocalStack - Local AWS cloud stack
localstack:
image: localstack/localstack:latest
container_name: ts-cloud-localstack
ports:
- "4566:4566" # LocalStack Gateway
- "4510-4559:4510-4559" # External services port range
environment:
# LocalStack configuration
- SERVICES=s3,dynamodb,lambda,cloudformation,iam,sts,cloudwatch,logs,sns,sqs,apigateway,route53,acm,cloudfront,secretsmanager,ssm,ec2,ecs,rds,elasticache
- DEBUG=1
- DATA_DIR=/tmp/localstack/data
- LAMBDA_EXECUTOR=docker
- DOCKER_HOST=unix:///var/run/docker.sock
- HOST_TMP_FOLDER=${TMPDIR}
- PERSISTENCE=1
# AWS configuration
- AWS_DEFAULT_REGION=us-east-1
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
volumes:
- "${TMPDIR:-/tmp}/localstack:/tmp/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- ts-cloud-network
# PostgreSQL for local database testing
postgres:
image: postgres:18-alpine
container_name: ts-cloud-postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=tscloud
- POSTGRES_PASSWORD=tscloud
- POSTGRES_DB=tscloud
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- ts-cloud-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tscloud"]
interval: 10s
timeout: 5s
retries: 5
# Redis for local caching
redis:
image: redis:8-alpine
container_name: ts-cloud-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis-data:/data
networks:
- ts-cloud-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# DynamoDB Local
dynamodb-local:
image: amazon/dynamodb-local:latest
container_name: ts-cloud-dynamodb
ports:
- "8000:8000"
command: ["-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "/data"]
volumes:
- dynamodb-data:/data
networks:
- ts-cloud-network
# DynamoDB Admin (Web UI for DynamoDB)
dynamodb-admin:
image: aaronshaf/dynamodb-admin:latest
container_name: ts-cloud-dynamodb-admin
ports:
- "8001:8001"
environment:
- DYNAMO_ENDPOINT=http://dynamodb-local:8000
- AWS_REGION=us-east-1
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
depends_on:
- dynamodb-local
networks:
- ts-cloud-network
# S3 Local (MinIO for S3-compatible storage)
minio:
image: minio/minio:latest
container_name: ts-cloud-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=tscloud
- MINIO_ROOT_PASSWORD=tscloud123
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
networks:
- ts-cloud-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Mailhog for local email testing
mailhog:
image: mailhog/mailhog:latest
container_name: ts-cloud-mailhog
ports:
- "1025:1025" # SMTP server
- "8025:8025" # Web UI
networks:
- ts-cloud-network
volumes:
postgres-data:
redis-data:
dynamodb-data:
minio-data:
networks:
ts-cloud-network:
driver: bridge