forked from sunnah-com/search
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (103 loc) · 2.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
106 lines (103 loc) · 2.92 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
version: '3'
services:
db:
image: mysql:5.7.22
platform: linux/amd64
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./db:/docker-entrypoint-initdb.d/:ro
env_file:
- .env
searchdb:
image: mysql:5.7.22
platform: linux/amd64
command: --default-authentication-plugin=mysql_native_password
# Holds the search_metrics shadow-sampling table. Its own DB/user/password
# come from the searchdb_* vars in .env (see .env.sample); the root password
# is reused from MYSQL_ROOT_PASSWORD. 01-search_metrics.sql creates the table
# on first init.
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${searchdb_name}
- MYSQL_USER=${searchdb_username}
- MYSQL_PASSWORD=${searchdb_password}
volumes:
- ./searchdb:/docker-entrypoint-initdb.d/:ro
- searchdb-data:/var/lib/mysql
web:
depends_on:
- "db"
- "searchdb"
- "elasticsearch"
build: .
command: flask run --host=0.0.0.0
volumes:
- .:/code
ports:
- "5000:5000"
env_file:
- .env
extra_hosts:
- "elasticsearch:172.31.250.10"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ES_STACK_VERSION}
container_name: elasticsearch
environment:
- node.name=elasticsearch
- discovery.type=single-node
- xpack.security.enabled=true
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- cluster.routing.allocation.disk.threshold_enabled=false
- ES_JAVA_OPTS=-Xms1g -Xmx1g
mem_limit: 2g
volumes:
- ./config/synonyms.txt:/usr/share/elasticsearch/config/synonyms.txt
- es-data:/usr/share/elasticsearch/data
- es-logs:/usr/share/elasticsearch/logs
env_file:
- .env
networks:
default:
ipv4_address: 172.31.250.10
es-exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:v1.7.0
restart: unless-stopped
command:
- '--es.uri=http://elasticsearch:9200'
- '--es.all'
- '--es.indices'
environment:
- ES_USERNAME=elastic
- ES_PASSWORD=${ELASTIC_PASSWORD}
mem_limit: 64m
depends_on:
- elasticsearch
alloy:
image: grafana/alloy:v1.4.2
restart: unless-stopped
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- /etc/alloy/config.alloy
volumes:
- ./config/alloy/config.alloy:/etc/alloy/config.alloy:ro
- es-logs:/es-logs:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- GC_LOKI_URL=${GC_LOKI_URL}
- GC_LOKI_USER=${GC_LOKI_USER}
- GC_LOKI_PASSWORD=${GC_LOKI_PASSWORD}
- GC_PROM_URL=${GC_PROM_URL}
- GC_PROM_USER=${GC_PROM_USER}
- GC_PROM_PASSWORD=${GC_PROM_PASSWORD}
- DEPLOY_ENV=${DEPLOY_ENV:-local}
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.31.250.0/24
volumes:
es-data:
es-logs:
searchdb-data: