-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (62 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
64 lines (62 loc) · 1.78 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
version: "3.9"
services:
mtls:
build:
context: .
dockerfile: cmd/mtls/Dockerfile
environment:
- API_URI=http://mockapi:3000
- SSM_TRANSPORT_CERTIFICATE_NAME=/sample-api/server-crt
- SSM_TRANSPORT_KEY_NAME=/sample-api/server-key
- SSM_CA_TRUSTED_LIST_NAME=/sample-api/ca-crt
- AWS_LOCAL=true
- REGION=us-east-1
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
ports:
- "443:443"
depends_on:
localstack:
condition: service_healthy
networks:
default:
aliases:
- matls-api.local
- matls-directory.local
localstack:
image: localstack/localstack
ports:
- "4566:4566"
environment:
# DynamoDB is not required anymore; keep only what we need.
- SERVICES=iam,ssm,lambda,kms,vpc,apigateway
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- DEBUG=1
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts/setup-localstack.sh:/etc/localstack/init/ready.d/setup.sh:ro
- ./keys/:/keys:ro
# Mount build output directories so setup-localstack.sh can read the zips it expects:
# /builds/authorizer/sample-api-<ver>-authorizer-function.zip
# /builds/mock/sample-api-<ver>-mock-api-function.zip
- ./authorizer/:/builds/authorizer/
- ./cmd/mockapi/:/builds/mock/
- ./openapi/api.yml:/builds/openapi/api.yml
healthcheck:
test:
[
"CMD",
"sh",
"-c",
"curl -f http://localhost:4566/_localstack/health || exit 1"
]
interval: 5s
timeout: 10s
retries: 10
start_period: 10s
networks:
default:
aliases:
- localstack.local