-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
71 lines (64 loc) · 1.49 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
67
68
69
70
71
version: '3.8'
services:
# MongoDB service
mongodb:
image: mongo
restart: always
container_name: mongodb
environment:
MONGO_INITDB_DATABASE: ApiGatewayDb
ports:
- "27017:27017"
volumes:
- ./data/mongo:/data/db
# Redis service
redis:
image: redis:alpine
container_name: redis
ports:
- "6379:6379"
# RabbitMQ service (với giao diện quản trị)
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
ports:
- "5672:5672" # Cổng RabbitMQ
- "15672:15672" # RabbitMQ Web UI
# Elasticsearch service
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
container_name: elasticsearch
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- "9200:9200"
- "9300:9300"
volumes:
- esdata:/usr/share/elasticsearch/data
# Kibana service
kibana:
image: docker.elastic.co/kibana/kibana:7.10.1
container_name: kibana
ports:
- "5601:5601"
depends_on:
- elasticsearch
# API Gateway service
apigateway:
build:
context: .
dockerfile: Dockerfile
container_name: apigateway
depends_on:
- mongodb
- redis
- rabbitmq
- elasticsearch
ports:
- "8080:80" # Cấu hình cho API
environment:
- MongoDbSettings__ConnectionString=mongodb://mongodb:27017
- MongoDbSettings__DatabaseName=ApiGatewayDb
volumes:
esdata: