-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (57 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
62 lines (57 loc) · 1.26 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
version: '3.8'
services:
devops-app:
build:
context: .
dockerfile: Dockerfile
image: spring-app
container_name: devops-app
ports:
- "8082:8080"
environment:
SPRING_PROFILES_ACTIVE: docker
depends_on:
mongo:
condition: service_healthy
rabbitmq:
condition: service_healthy
memcached:
condition: service_healthy
mongo:
image: mongo:4.4
container_name: mongo
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongo", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "5674:5672"
- "15674:15672" # Management UI
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 5
memcached:
image: memcached:alpine
container_name: memcached
ports:
- "11211:11211"
healthcheck:
test: ["CMD", "echo", "version", "|", "nc", "localhost", "11211"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongo-data: