-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
79 lines (76 loc) · 1.85 KB
/
docker-compose.yml
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
version: "3.7"
services:
test:
build:
context: .
dockerfile: Dockerfile-test
environment:
- AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
- AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# ECS adds this environment variable
- AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/creds
volumes:
- type: volume
source: minio-buckets
target: /test-data
- type: volume
source: simulate-nfs
target: /nfs-1
- type: volume
source: simulate-nfs
target: /nfs-2
networks:
ecs_emulation:
ipv4_address: '169.254.170.3'
depends_on:
- minio
- motoserver
- ecs-credentials-endpoint
minio:
build:
context: .
dockerfile: Dockerfile-minio
environment:
- MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
- MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- MINIO_REGION=us-east-1
ports:
- "9000:9000"
volumes:
- type: volume
source: minio-buckets
target: /test-data
networks:
ecs_emulation:
ipv4_address: '169.254.170.4'
motoserver:
image: motoserver/moto:latest
ports:
- "3000:3000"
environment:
- MOTO_PORT=3000
networks:
ecs_emulation:
ipv4_address: '169.254.170.5'
ecs-credentials-endpoint:
build:
context: .
dockerfile: Dockerfile-ecs-credentials
environment:
# So the mock ECS credentials server can simulate the real one
- AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/creds
ports:
- "80:80"
networks:
ecs_emulation:
# ECS provides a similar service at this exact address
ipv4_address: '169.254.170.2'
volumes:
minio-buckets:
simulate-nfs:
networks:
ecs_emulation:
driver: bridge
ipam:
config:
- subnet: '169.254.170.0/24'