-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
194 lines (182 loc) · 5.68 KB
/
docker-compose.yaml
File metadata and controls
194 lines (182 loc) · 5.68 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
services:
kafka:
image: apache/kafka:latest
hostname: broker
container_name: kafka
ports:
- "${KAFKA_PORT}:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@broker:29093
KAFKA_LISTENERS: PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LOG_DIRS: /tmp/kraft-combined-logs
CLUSTER_ID: ${KAFKA_CLUSTER_ID}
postgres:
container_name: postgres
image: postgres:17-alpine
restart: "no"
ports:
- "${PG_PORT:-5433}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker-db-init:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: ${PG_USER:-postgres}
POSTGRES_PASSWORD: ${PG_PASSWORD:-postgres}
POSTGRES_DB: postgres
redis:
container_name: redis
image: redis:8.6.1-alpine
restart: "no"
ports:
- "${REDIS_PORT:-6379}:6379"
keycloak:
image: quay.io/keycloak/keycloak:latest
command: start-dev
container_name: keycloak
environment:
KC_DB: postgres
KC_DB_URL_HOST: postgres
KC_DB_URL: ${INTERNAL_POSTGRES_URL}
KC_DB_USERNAME: ${PG_USER:-postgres}
KC_DB_PASSWORD: ${PG_PASSWORD:-postgres}
KC_HOSTNAME: ${KEYCLOAK_HOST}
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN_USERNAME}
KC_BOOTSTRAP_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:-broker:29092}
KAFKA_LOGIN_TOPIC: ${KAFKA_LOGIN_TOPIC}
ports:
- "${KEYCLOAK_PORT:-9090}:8080"
volumes:
- keycloak_data:/opt/keycloak/data
- ./KeycloakLoginEventListener/target:/opt/keycloak/providers
depends_on:
- postgres
- kafka
traefik:
image: traefik:v3.0
container_name: traefik-gateway
ports:
- "${TRAEFIK_HTTP_PORT:-70}:80"
- "${TRAEFIK_DASHBOARD_PORT:-8070}:8080"
volumes:
- ./traefik:/etc/traefik
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- "--api.dashboard=true"
- "--providers.file.directory=/etc/traefik/dynamic"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:80"
- "--log.level=DEBUG"
environment:
ALLOW_ORIGIN_1: ${TRAEFIK_ALLOW_ORIGIN_1}
networks:
- traefik-net
minio:
image: minio/minio:latest
container_name: minio
environment:
MINIO_ROOT_USER: ${MINIO_USER}
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
ports:
- "${MINIO_SERVICE_PORT:-9000}:9000"
- "${MINIO_WEB_PORT:-9001}:9001"
command:
- server
- /data
- --console-address
- ":${MINIO_WEB_PORT:-9001}"
volumes:
- minio_data:/data
user-service:
build:
context: .
dockerfile: UserService/Dockerfile
container_name: user-service
restart: on-failure
ports:
- "${USER_SERVICE_PORT:-8080}:8080"
environment:
OAUTH2_ISSUER_URI: ${OAUTH2_ISSUER_URI}
PG_URL: ${PG_URL}
PG_USERNAME: ${PG_USERNAME}
PG_PASSWORD: ${PG_PASSWORD}
KEYCLOAK_URL: ${KEYCLOAK_URL}
KEYCLOAK_REALM: ${KEYCLOAK_REALM}
KEYCLOAK_CURRENT_REALM: ${KEYCLOAK_CURRENT_REALM}
KEYCLOAK_USERNAME: ${KEYCLOAK_USERNAME}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
MINIO_ENDPOINT: ${MINIO_ENDPOINT}
MINIO_REGION: ${MINIO_REGION}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_APP_KEY: ${MINIO_APP_KEY}
USER_CREATED_TOPIC: ${USER_CREATED_TOPIC}
USER_LOGGED_IN_TOPIC: ${USER_LOGGED_IN_TOPIC}
OAUTH2_LOGIN_TOPIC: ${OAUTH2_LOGIN_TOPIC}
USER_LOCKED_TOPIC: ${USER_LOCKED_TOPIC}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:-broker:29092}
depends_on:
- postgres
- kafka
- keycloak
- redis
task-service:
build:
context: .
dockerfile: TaskService/Dockerfile
container_name: task-service
restart: on-failure
ports:
- "${TASK_SERVICE_PORT:-8085}:8085"
environment:
OAUTH2_ISSUER_URI: ${OAUTH2_ISSUER_URI}
PG_URL: ${PG_URL}
PG_USERNAME: ${PG_USERNAME}
PG_PASSWORD: ${PG_PASSWORD}
TASK_CLIENT_SECRET: ${TASK_CLIENT_SECRET}
TASK_CREATED_TOPIC: ${TASK_CREATED_TOPIC}
TEST_CASE_EVENTS_TOPIC: ${TEST_CASE_EVENTS_TOPIC}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:-broker:29092}
depends_on:
- postgres
- kafka
execution-service:
build:
context: .
dockerfile: ExecutionService/Dockerfile
container_name: execution-service
restart: on-failure
ports:
- "${EXECUTION_SERVICE_PORT:-8084}:8084"
environment:
OAUTH2_ISSUER_URI: ${OAUTH2_ISSUER_URI}
PG_URL: ${PG_URL}
PG_USERNAME: ${PG_USERNAME}
PG_PASSWORD: ${PG_PASSWORD}
TEST_CASE_EVENTS_TOPIC: ${TEST_CASE_EVENTS_TOPIC}
EXECUTION_ATTEMPT_TOPIC: ${EXECUTION_ATTEMPT_TOPIC}
DOCKER_HOST: ${DOCKER_HOST:-unix:///var/run/docker.sock}
KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:-broker:29092}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- postgres
- kafka
volumes:
postgres_data:
keycloak_data:
minio_data:
networks:
traefik-net:
driver: bridge