-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
175 lines (175 loc) · 5.68 KB
/
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
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
services:
balancer:
container_name: lms-balancer
image: nginx
ports:
- "8080:8080"
networks:
- lms-network
volumes:
- ./infra/nginx:/etc/nginx/conf.d
depends_on:
botalka:
condition: service_started
botalka:
image: eclipse-temurin:21-jdk-alpine
volumes:
- ./botalka/build/libs/botalka-0.0.1.jar:/botalka.jar
command: [ "java", "-jar", "/botalka.jar" ]
environment:
LMS_POSTGRES_HOST: database
LMS_POSTGRES_DB: ${LMS_POSTGRES_DB?:err}
LMS_POSTGRES_USER: ${LMS_POSTGRES_USER?:err}
LMS_POSTGRES_PASSWORD: ${LMS_POSTGRES_PASSWORD?:err}
LMS_KAFKA_HOST: broker
LMS_YANDEX_OAUTH_URL: ${LMS_YANDEX_OAUTH_URL?:err}
LMS_YANDEX_LOGIN_URL: ${LMS_YANDEX_LOGIN_URL?:err}
LMS_YANDEX_CLIENT_ID: ${LMS_YANDEX_CLIENT_ID?:err}
LMS_YANDEX_CLIENT_SECRET: ${LMS_YANDEX_CLIENT_SECRET?:err}
LMS_SECURITY_TOKEN_SIGNING_SECRET: ${LMS_SECURITY_TOKEN_SIGNING_SECRET?:err}
LMS_TEST_TELEGRAM_BOT_API_TOKEN: ${LMS_TEST_TELEGRAM_BOT_API_TOKEN?:err}
LMS_TEST_TELEGRAM_ADMIN_CHAT_ID: ${LMS_TEST_TELEGRAM_ADMIN_CHAT_ID?:err}
LMS_PROMETHEUS_ACCESS_TOKEN: ${LMS_PROMETHEUS_ACCESS_TOKEN?:err}
LMS_FUZZING_ACCESS_TOKEN: ${LMS_FUZZING_ACCESS_TOKEN?:err}
networks:
- lms-network
depends_on:
database:
condition: service_healthy
broker-setup:
condition: service_completed_successfully
database:
container_name: lms-database
image: postgres
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${LMS_POSTGRES_DB?:err}
POSTGRES_USER: ${LMS_POSTGRES_USER?:err}
POSTGRES_PASSWORD: ${LMS_POSTGRES_USER?:err}
volumes:
- ./infra/postgres/postgresql.conf:/etc/postgresql/postgresql.conf
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
networks:
- lms-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
broker:
container_name: lms-broker
image: apache/kafka
restart: always
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT_HOST://broker:9092,PLAINTEXT://broker:19092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'CONTROLLER://:29093,PLAINTEXT_HOST://broker:9092,PLAINTEXT://:19092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
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_LOG4J_ROOT_LOGLEVEL: 'WARN'
KAFKA_LOG4J_LOGGERS: 'kafka=WARN,kafka.controller=WARN,kafka.log.LogCleaner=WARN,state.change.logger=WARN,kafka.producer.async.DefaultEventHandler=WARN'
networks:
- lms-network
healthcheck:
test: nc -z broker 9092 || exit 1
interval: 5s
timeout: 5s
retries: 5
broker-setup:
container_name: lms-broker-setup
image: apache/kafka
networks:
- lms-network
volumes:
- ./infra/kafka/setup.sh:/infra/kafka/setup.sh
environment:
LMS_KAFKA_HOST: broker
LMS_KAFKA_PORT: 9092
entrypoint: [ "/bin/sh", "-c" ]
command: "infra/kafka/setup.sh"
depends_on:
broker:
condition: service_healthy
grafana:
container_name: lms-grafana
build:
context: infra/grafana
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./infra/grafana/grafana.ini:/etc/grafana/grafana.ini
environment:
- GF_SECURITY_ADMIN_USER=${LMS_GF_SECURITY_ADMIN_USER?:err}
- GF_SECURITY_ADMIN_PASSWORD=${LMS_GF_SECURITY_ADMIN_PASSWORD?:err}
- LMS_PROMETHEUS_HOST=prometheus
networks:
- lms-network
prometheus:
container_name: lms-prometheus
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./infra/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- lms-network
database_metrics:
container_name: lms-database-metrics
image: quay.io/prometheuscommunity/postgres-exporter
environment:
DATA_SOURCE_NAME: "postgresql://${LMS_POSTGRES_USER?:err}:${LMS_POSTGRES_PASSWORD?:err}@lms-database:5432/${LMS_POSTGRES_DB?:err}?sslmode=disable"
volumes:
- ./infra/postgres-exporter/postgres_exporter.yml:/postgres_exporter.yml
networks:
- lms-network
depends_on:
database:
condition: service_healthy
broker_metrics:
container_name: lms-broker-metrics
image: danielqsj/kafka-exporter
command: [ "--kafka.server=broker:9092" ]
networks:
- lms-network
depends_on:
broker-setup:
condition: service_completed_successfully
restler:
image: restler
stdin_open: true
tty: true
restart: always
entrypoint: [ "sh", "-c", "sleep 8 && ./lms/infra/fuzzing/restler/compile.sh && ./lms/infra/fuzzing/restler/fuzz.sh" ]
volumes:
- .:/lms
networks:
- lms-network
depends_on:
- balancer
evomaster:
image: eclipse-temurin:21-jdk-alpine
stdin_open: true
tty: true
restart: always
volumes:
- ./infra/fuzzing/evomaster/em.yaml:/infra/fuzzing/evomaster/em.yaml
- ./infra/fuzzing/evomaster/download.sh:/infra/fuzzing/evomaster/download.sh
- ./infra/fuzzing/evomaster/run.sh:/infra/fuzzing/evomaster/run.sh
command: /infra/fuzzing/evomaster/run.sh
networks:
- lms-network
depends_on:
- balancer
networks:
lms-network:
driver: bridge