-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
285 lines (267 loc) · 7.95 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
285 lines (267 loc) · 7.95 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
services:
go-dev-container:
container_name: go-dev-container
build:
context: .
dockerfile: go-dev-container.Dockerfile
network: host
nginx:
image: nginx:stable
container_name: nginx
command: ["nginx-debug", "-g", "daemon off;"]
network_mode: "host"
# ports:
# - "80:80"
# - "443:443"
# - "10080:10080"
volumes:
- ${HOME}/docker-volumes/nginx-data:/etc/nginx
# networks:
# - myhost
certbot:
image: certbot/certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
mariadb:
image: mariadb:lts
container_name: maria-db
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: on-failure
networks:
- mybridge
environment:
MARIADB_ROOT_PASSWORD: mariadb
MARIADB_DATABASE: default_db
MARIADB_USER: mariadb_user
MARIADB_PASSWORD: mariadb_pw
volumes:
- mariadb-data:/var/lib/mysql
ports:
- "3307:3306"
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "127.0.0.1" ]
interval: 30s
timeout: 10s
retries: 5
mysql:
image: mysql:${MYSQL_VERSION:-8}
container_name: mysql-db
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: on-failure
networks:
- mybridge
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-mysql}
MYSQL_DATABASE: ${MYSQL_DATABASE:-mydb}
MYSQL_USER: ${MYSQL_USER:-mysql}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-mysql}
ports:
- "${MYSQL_PORT:-3306}:3306"
volumes:
- ${HOME}/projects/docker-services/volumes/general/mysql/${MYSQL_VERSION:-8}:/var/lib/mysql
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD" ]
interval: 30s
timeout: 10s
retries: 5
postgres:
image: postgres:${POSTGRES_VERSION:-18}
container_name: postgres
restart: always
networks:
- services-net
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-mydb}
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ${HOME}/projects/docker-services/volumes/general/postgres/${POSTGRES_VERSION:-18}:/var/lib/postgresql
postgresql:
image: postgres:${POSTGRES_VERSION:-18}
container_name: postgre-db
restart: on-failure
command: ["postgres", "-c", "log_statement=all"]
networks:
- mybridge
volumes:
- ${HOME}/projects/docker-services/volumes/general/postgres/${POSTGRES_VERSION:-18}:/var/lib/postgresql
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-mydb}
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 30s
cassandra:
image: cassandra:4.1.1
container_name: cassandra
restart: on-failure
environment:
CASSANDRA_SEEDS: cassandra
CASSANDRA_CLUSTER_NAME: docker-cassandra-cluster
CASSANDRA_AUTHENTICATOR: PasswordAuthenticator
CASSANDRA_SUPERUSER_USER_NAME: root
CASSANDRA_SUPERUSER_PASSWORD: cassandra
networks:
- mybridge
ports:
- 9042:9042
volumes:
- ${HOME}/docker-volumes/cassandra-data:/var/lib/cassandra
healthcheck:
test: ["CMD-SHELL", "nodetool status"]
interval: 30s
timeout: 10s
retries: 5
redis:
image: redis:${REDIS_VERSION:-8}
container_name: redis-db
environment:
- REDIS_REPLICATION_MODE=master
- ALLOW_EMPTY_PASSWORD=yes
ports:
- "${REDIS_PORT:-6379}:6379"
networks:
- mybridge
volumes:
- ${HOME}/projects/docker-services/volumes/general/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 3s
retries: 30
mongodb:
image: mongo
container_name: mongo-db
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongodb
volumes:
- ${HOME}/docker-volumes/mongodb-data:/data/db
ports:
- "27017:27017"
networks:
- mybridge
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo-db:27017 --quiet
interval: 30s
timeout: 10s
retries: 5
kafka:
image: "bitnami/kafka:latest"
platform: linux/amd64
ports:
- "9092:9092"
environment:
KAFKA_ENABLE_KRAFT: yes
KAFKA_CFG_PROCESS_ROLES: broker,controller
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
KAFKA_BROKER_ID: 1
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9093
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: true
volumes:
- ${HOME}/docker-volumes/kafka/data:/bitnami/kafka
networks:
- mybridge
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
depends_on:
- kafka
ports:
- "9081:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:9092"
qdrant:
# Dashboard: http://localhost:6333/dashboard
image: qdrant/qdrant
container_name: qdrant-db
restart: on-failure
networks:
- mybridge
volumes:
- ~/docker-volumes/qdrant:/qdrant/storage
ports:
- "6333:6333"
- "6334:6334"
environment:
QDRANT__LOG_LEVEL: INFO
QDRANT__SERVICE__HTTP_PORT: 6333
QDRANT__SERVICE__ENABLE_TLS: 0
opensearch:
image: opensearchproject/opensearch:latest
container_name: opensearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
- "DISABLE_SECURITY_PLUGIN=true" # Disables Security plugin
ports:
- "9200:9200"
- "9300:9300"
volumes:
- "opensearch-data:/usr/share/opensearch/data"
networks:
- mybridge
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:latest # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
container_name: opensearch-dashboards
ports:
- 5601:5601 # Map host port 5601 to container port 5601
expose:
- "5601" # Expose port 5601 for web access to OpenSearch Dashboards
environment:
OPENSEARCH_HOSTS: '["http://opensearch:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true # disables security dashboards plugin in OpenSearch Dashboards
networks:
- mybridge
networks:
myhost:
driver: host
mybridge:
driver: bridge
volumes:
postgresql-data:
driver: local
driver_opts:
type: none
device: ${HOME}/docker-volumes/projects/postgresql-data
o: bind
opensearch-data:
mysql-data:
driver: local
driver_opts:
type: none
device: ${HOME}/docker-volumes/projects/mysql-data
o: bind
redis-data:
driver: local
driver_opts:
type: none
device: ${HOME}/docker-volumes/projects/redis-data
o: bind
mariadb-data:
driver: local
driver_opts:
type: none
device: ${HOME}/docker-volumes/projects/mariadb-data
o: bind