-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
66 lines (60 loc) · 1.59 KB
/
docker-compose.yaml
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'
services:
rabbitmq:
container_name: rabbitmq
restart: on-failure
image: "rabbitmq:3.8-management"
ports:
- "4369:4369"
- "5671:5671"
- "5672:5672"
- "25672:25672"
- "15671:15671"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
volumes:
- ./rabbitmq_data:/var/lib/rabbitmq
networks:
default: # Use the custom network
aliases:
- rabbitmq # alias for the "rabbitmq" service
rabbit-consumer:
container_name: rabbit-consumer-service
restart: on-failure
build:
context: . # The context is the current directory (where the Dockerfile is located)
dockerfile: Dockerfile # Use the Dockerfile
ports:
- "8080:8080" # Map Spring Boot application port
depends_on:
- rabbitmq
links:
- rabbitmq
networks:
default: # Use the custom network
aliases:
- rabbit-consumer-service # alias for the "rabbit-consumer" service
volumes:
- ./src/main/resources/application-docker.properties:/app/application.properties
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
networks:
- default
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3000:3000"
volumes:
- ./monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
networks:
- default
networks:
default: