-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.59 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
version: '2.4'
services:
employee-service:
build: ./employee-service
container_name: employee-service
ports:
- 8001:8080
environment:
- SPRING_PROFILES_ACTIVE=localstack
depends_on:
postgres:
condition: service_healthy
localstack:
condition: service_healthy
consumer-service-1:
build: ./consumer-service
container_name: consumer-service-1
ports:
- 8002:8080
environment:
- SPRING_PROFILES_ACTIVE=localstack
- INPUT_QUEUE=consumer_1_queue.fifo
depends_on:
localstack:
condition: service_healthy
consumer-service-2:
build: ./consumer-service
container_name: consumer-service-2
ports:
- 8003:8080
environment:
- SPRING_PROFILES_ACTIVE=localstack
- INPUT_QUEUE=consumer_2_queue.fifo
depends_on:
localstack:
condition: service_healthy
postgres:
image: postgres:12-alpine
container_name: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
localstack:
image: localstack/localstack:0.12.12
container_name: localstack
healthcheck:
test: ["CMD-SHELL", "awslocal sns list-topics && awslocal sqs list-queues"]
environment:
- AWS_DEFAULT_REGION=eu-central-1
- SERVICES=sqs,sns
- HOSTNAME_EXTERNAL=localstack
- DOCKER_HOST=unix:///var/run/docker.sock
ports:
- "4566-4599:4566-4599"
volumes:
- "/tmp/localstack:/tmp/localstack"
- "./.localstack:/docker-entrypoint-initaws.d"