-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
136 lines (126 loc) · 2.9 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
services:
mysql-db:
restart: always
container_name: mysql-db
image: 'mysql:8.0'
environment:
MYSQL_ROOT_USERNAME: root
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: '%'
volumes:
- ./databases/volumes/sql:/docker-entrypoint-initdb.d
- ./databases/scripts/job-management.sql:/docker-entrypoint-initdb.d/0_init.sql
ports:
- "3307:3306"
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_ROOT_USERNAME --password=$$MYSQL_ROOT_PASSWORD
timeout: 2s
retries: 2
zipkin:
image: openzipkin/zipkin
container_name: zipkin
ports:
- "9411:9411"
discovery:
image: jmgm/discovery-service
container_name: eureka-server
build:
context: ./infra/infra-discovery-service
dockerfile: Dockerfile
ports:
- "8761:8761"
gateway:
image: jmgm/api-gateway-service
container_name: api-gateway-service
build:
context: ./infra/infra-api-gateway
dockerfile: Dockerfile
ports:
- "9094:9094"
links:
- discovery
environment:
- PROFILE=docker
company:
image: jmgm/company-service
container_name: company-service
ports:
- "8081:8081"
build:
context: ./microservices/ms-company-service
dockerfile: Dockerfile
depends_on:
- discovery
- mysql-db
links:
- discovery
- zipkin
environment:
- PROFILE=docker
job:
image: jmgm/job-service
container_name: job-service
ports:
- "8082:8082"
build:
context: ./microservices/ms-job-service
dockerfile: Dockerfile
depends_on:
- mysql-db
links:
- discovery
- zipkin
environment:
- PROFILE=docker
review:
image: jmgm/review-service
container_name: review-service
ports:
- "8083:8083"
build:
context: ./microservices/ms-review-service
dockerfile: Dockerfile
depends_on:
- discovery
- company
- mysql-db
links:
- discovery
- zipkin
environment:
- PROFILE=docker
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./observability/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
links:
- discovery
- gateway
- company
- job
- review
loki:
image: grafana/loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SECURITY_ADMIN_USER=admin
volumes:
- ./observability/grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- observability/grafana/config.monitoring
depends_on:
- loki
- prometheus