-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
215 lines (210 loc) · 6.97 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
services:
postgresql:
build:
context: ./db
dockerfile: Dockerfile
image: "cr.yandex/crp3ftp1b7dveeagva5g/madr-postgres:latest"
ports:
- "5432:5432"
networks:
mynetwork:
environment:
- TZ=Europe/Moscow
madr:
build: .
image: "cr.yandex/crp3ftp1b7dveeagva5g/madr-go-app:latest"
ports:
- "8080:8080"
networks:
mynetwork:
environment:
- TZ=Europe/Moscow
- DB_CONN_STR=user=postgres dbname=postgres host=postgresql port=5432 sslmode=disable
- TOKEN_EXPIRATION_TIME=48 # hours
- TOKEN_SECRET=secret
- SALT_LENGTH=16
madr-react-app:
build:
context: ./madr_web_app
dockerfile: Dockerfile
image: "cr.yandex/crp3ftp1b7dveeagva5g/madr-react:latest"
ports:
- "80:80"
networks:
mynetwork:
mongo:
ports:
- '27017:27017'
container_name: mongo
restart: always
logging:
options:
max-size: 1g
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: wiktionary
image: mongo:latest
networks:
mynetwork:
volumes:
- ./mongo:/data/db
- type: bind
source: ./mongo-entrypoint/
target: /docker-entrypoint-initdb.d/
healthcheck:
test: echo 'db.runCommand({find:"wiktionary.user"}).ok' | mongosh --authenticationDatabase admin --host localhost -u admin -p admin admin --quiet | grep -q 1
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
# monctionary:
# container_name: monctionary
# image: ghcr.io/ogniloud/external-dictionaries/monctionary:latest
# environment:
# SPRING_DATA_MONGODB_HOST: mongo
#
## SPRING_APPLICATION_DICTIONARIES_0_WIKTIONARY_LANGUAGE: EN
## SPRING_APPLICATION_DICTIONARIES_0_WORDS_LANGUAGE: EN
## SPRING_APPLICATION_DICTIONARIES_0_DICTIONARY: ./mongo-entrypoint/en_to_en.json
##
## SPRING_APPLICATION_DICTIONARIES_1_WIKTIONARY_LANGUAGE: EN
## SPRING_APPLICATION_DICTIONARIES_1_WORDS_LANGUAGE: RU
## SPRING_APPLICATION_DICTIONARIES_1_DICTIONARY: ./mongo-entrypoint/ru_to_en.json
##
## SPRING_APPLICATION_DICTIONARIES_2_WIKTIONARY_LANGUAGE: EN
## SPRING_APPLICATION_DICTIONARIES_2_WORDS_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_2_DICTIONARY: ./mongo-entrypoint/es_to_en.json
#
# SPRING_APPLICATION_DICTIONARIES_0_WIKTIONARY_LANGUAGE: RU
# SPRING_APPLICATION_DICTIONARIES_0_WORDS_LANGUAGE: EN
# SPRING_APPLICATION_DICTIONARIES_0_DICTIONARY: ./mongo-entrypoint/en_to_ru.json
#
## SPRING_APPLICATION_DICTIONARIES_4_WIKTIONARY_LANGUAGE: RU
## SPRING_APPLICATION_DICTIONARIES_4_WORDS_LANGUAGE: RU
## SPRING_APPLICATION_DICTIONARIES_4_DICTIONARY: ./mongo-entrypoint/ru_to_ru.json
##
## SPRING_APPLICATION_DICTIONARIES_5_WIKTIONARY_LANGUAGE: RU
## SPRING_APPLICATION_DICTIONARIES_5_WORDS_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_5_DICTIONARY: ./mongo-entrypoint/es_to_ru.json
##
## SPRING_APPLICATION_DICTIONARIES_6_WIKTIONARY_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_6_WORDS_LANGUAGE: EN
## SPRING_APPLICATION_DICTIONARIES_6_DICTIONARY: ./mongo-entrypoint/en_to_es.json
##
## SPRING_APPLICATION_DICTIONARIES_7_WIKTIONARY_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_7_WORDS_LANGUAGE: RU
## SPRING_APPLICATION_DICTIONARIES_7_DICTIONARY: ./mongo-entrypoint/ru_to_es.json
##
## SPRING_APPLICATION_DICTIONARIES_8_WIKTIONARY_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_8_WORDS_LANGUAGE: ES
## SPRING_APPLICATION_DICTIONARIES_8_DICTIONARY: ./mongo-entrypoint/es_to_es.json
#
# networks:
# mynetwork:
# ports:
# - 8083:8080
# depends_on:
# mongo:
# condition: service_healthy
# volumes:
# - ./mongo-entrypoint:/mongo-entrypoint
# wordmaster:
# container_name: wordmaster
# image: ghcr.io/ogniloud/external-dictionaries/wordmaster:latest
# environment:
# SPRING_KAFKA_BOOTSTRAP-SERVERS: kafka1:19092,kafka2:19093
# SPRING_DATA_MONGODB_HOST: mongo
# networks:
# mynetwork:
# ports:
# - 8084:8080
# extra_hosts:
# - "host.docker.internal:host-gateway"
# depends_on:
# kafka1:
# condition: service_started
# kafka2:
# condition: service_started
## monctionary:
## condition: service_completed_successfully
#
# zoo1:
# image: confluentinc/cp-zookeeper:7.3.2
# hostname: zoo1
# container_name: zoo1
# ports:
# - "2181:2181"
# environment:
# ZOOKEEPER_CLIENT_PORT: 2181
# ZOOKEEPER_SERVER_ID: 1
# ZOOKEEPER_SERVERS: zoo1:2888:3888
# volumes:
# - zoo_data:/var/lib/zookeeper/data:rw
# - zoo_log:/var/lib/zookeeper/log:rw
# networks:
# mynetwork:
# extra_hosts:
# - "host.docker.internal:host-gateway"
#
# kafka1:
# image: confluentinc/cp-kafka:7.3.2
# hostname: kafka1
# container_name: kafka1
# ports:
# - "9092:9092"
# - "29092:29092"
# environment:
# KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092,DOCKER://host.docker.internal:29092
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
# KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
# KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
# KAFKA_BROKER_ID: 1
# KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
# KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
# KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
# KAFKA_DEFAULT_REPLICATION_FACTOR: 2
# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
# depends_on:
# - zoo1
# volumes:
# - broker1:/var/lib/kafka/data:rw
# networks:
# mynetwork:
# extra_hosts:
# - "host.docker.internal:host-gateway"
#
# kafka2:
# image: confluentinc/cp-kafka:7.3.2
# hostname: kafka2
# container_name: kafka2
# ports:
# - "9093:9093"
# - "29093:29093"
# environment:
# KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka2:19093,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9093,DOCKER://host.docker.internal:29093
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,DOCKER:PLAINTEXT
# KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
# KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
# KAFKA_BROKER_ID: 2
# KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
# KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
# KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "true"
# KAFKA_DEFAULT_REPLICATION_FACTOR: 2
# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
# depends_on:
# - zoo1
# volumes:
# - broker2:/var/lib/kafka/data:rw
# networks:
# mynetwork:
# extra_hosts:
# - "host.docker.internal:host-gateway"
networks:
mynetwork:
driver: bridge
#volumes:
# zoo_data: { }
# zoo_log: { }
# broker1: { }
# broker2: { }