-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
135 lines (123 loc) · 3.48 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
version: "3.4"
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.9
container_name: zookeeper
restart: always
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: docker.io/bitnami/kafka:3.5
container_name: kafka
ports:
- "9092:9092"
# - "9094:9094"
restart: always
volumes:
- "kafka_data:/bitnami"
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_CFG_KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
- KAFKA_CFG_KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
depends_on:
- zookeeper
sql-server-db:
image: mcr.microsoft.com/mssql/server:2022-latest
hostname: "sql-server-db"
labels:
NAME: "sql-server-db"
ports:
- "1433:1433"
environment:
SA_PASSWORD: "Password123"
ACCEPT_EULA: "Y"
HOMEBREW_NO_ENV_FILTERING: 1
mongodb:
image: mongo:6-jammy
ports:
- '27018:27017'
volumes:
- dbdata6:/data/db
api-gateway:
build:
context: .
dockerfile: ./src/ApiGateway/JiraSample.ApiGateway/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ReverseProxy__Clusters__auth-cluster__Destinations__destination1__Address=http://auth-service:8080/
- ReverseProxy__Clusters__command-cluster__Destinations__destination1__Address=http://command-service:8080/
- ReverseProxy__Clusters__query-cluster__Destinations__destination1__Address=http://query-service:8080/
ports:
- "5001:8080"
- "5051:8081"
restart: on-failure:15 # always
# depends_on:
# - replace
command-service:
build:
context: .
dockerfile: ./src/Jira.Command/JiraSample.Command.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- KAFKA_TOPIC=Jira_App_Events
- ProducerConfig__BootstrapServers=kafka:9092
- MongoDbConfig__ConnectionString=mongodb://host.docker.internal:27018
ports:
- "5002:8080"
- "5052:8081"
restart: on-failure:15 # always
depends_on:
- kafka
- mongodb
query-service:
build:
context: .
dockerfile: ./src/Jira.Query/JiraSample.Query.Api/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- KAFKA_TOPIC=Jira_App_Events
- ConsumerConfig__BootstrapServers=kafka:9092
- ConnectionStrings__JiraDatabaseConnection=Server=sql-server-db;Database=JiraDatabase;User Id=sa;Password=Password123;TrustServerCertificate=true
ports:
- "5003:8080"
- "5053:8081"
restart: on-failure:15 # always
depends_on:
- kafka
- sql-server-db
auth-service:
build:
context: .
dockerfile: ./src/Jira.Common/JiraSample.Auth/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "5004:8080"
- "5054:8081"
restart: on-failure:15 # always
ui-app:
build:
context: ./src/Jira.Webapp
dockerfile: Dockerfile
# environment:
# - ASPNETCORE_ENVIRONMENT=Development
ports:
- "5005:3000"
# - "5054:8081"
restart: on-failure:15 # always
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
dbdata6:
networks:
default:
name: mydockernetwork
# external: true