-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathdocker-compose.local.yml
83 lines (78 loc) · 1.81 KB
/
docker-compose.local.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
80
81
82
83
services:
postgres:
image: postgres:latest
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-admin}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-master123}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-admin}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- backend
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER:-admin}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS:-master123}
volumes:
- rabbit_data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
networks:
- backend
redis:
image: redis:latest
ports:
- "6379:6379"
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD:-master123}
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: always
networks:
- backend
mongodb:
image: mongo:latest
ports:
- "27017:27017"
- "28017:28017"
command: --replSet rs0
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
restart: always
networks:
- backend
networks:
backend:
name: backend
external: true
volumes:
pg_data:
rabbit_data:
redis_data:
mongo_data: