-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-shared-services.yml
66 lines (61 loc) · 1.4 KB
/
docker-compose-shared-services.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
version: "3.7"
services:
postgres:
container_name: postgres_db
image: postgres:11-alpine
networks:
- micro-backend
environment:
POSTGRES_USER: "postgres_user"
POSTGRES_PASSWORD: "postgres_pass"
volumes:
- postgres_db:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 10s
retries: 3
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management
networks:
- micro-backend
environment:
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG"
RABBITMQ_DEFAULT_USER: "rabbit_user"
RABBITMQ_DEFAULT_PASS: "rabbit_pass"
RABBITMQ_DEFAULT_VHOST: "/"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
ports:
- 15672:15672
- 5672:5672
healthcheck:
test: [ "CMD", "rabbitmqctl", "status"]
interval: 5s
timeout: 10s
retries: 5
redis:
container_name: redis
image: redis
networks:
- micro-backend
volumes:
- redis_data:/data
ports:
- 6379:6379
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<> /dev/tcp/127.0.0.1/6379 && echo PING >&3 && head -1 <&3 | grep PONG"]
interval: 5s
timeout: 10s
retries: 5
networks:
micro-backend:
name: micro-backend
driver: bridge
volumes:
rabbitmq_data:
redis_data:
postgres_db: