Skip to content

Commit b0e8925

Browse files
committed
changed elasticdb
1 parent 1608e41 commit b0e8925

File tree

7 files changed

+6
-166
lines changed

7 files changed

+6
-166
lines changed

elasticdb/.env-example

Lines changed: 0 additions & 6 deletions
This file was deleted.

elasticdb/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ yarn-error.log*
2929
.env.*
3030
.env
3131

32-
# vercel
33-
.vercel
3432

3533
# typescript
3634
*.tsbuildinfo

elasticdb/docker-compose.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ services:
66
volumes:
77
- elasticsearch-data:/usr/share/elasticsearch/data
88
environment:
9-
# - bootstrap.memory_lock=true
109
- discovery.type=single-node
1110
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
12-
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
13-
- xpack.security.enabled=$ELASTIC_SECURITY
14-
# ulimits:
15-
# memlock:
16-
# soft: -1
17-
# hard: -1
11+
- xpack.security.enabled=false
1812
mem_limit: 512m
1913
cpus: 0.7
2014
ports:
@@ -23,25 +17,11 @@ services:
2317
- stack
2418

2519
kibana:
26-
# image: docker.elastic.co/kibana/kibana:$ELASTIC_VERSION
27-
build:
28-
context: . # Build context is the "kibana" directory
29-
dockerfile: Dockerfile
30-
args:
31-
- ELASTIC_VERSION=${ELASTIC_VERSION}
32-
# command: ["sh", "-c", "/usr/share/kibana/init.sh"]
20+
image: docker.elastic.co/kibana/kibana:${ELASTIC_VERSION}
3321
volumes:
3422
- kibana-data:/usr/share/kibana/data
35-
# volumes:
36-
# - ./kibana/init.sh:/usr/share/kibana/init.sh:z # Mount the script as a volume
3723
environment:
38-
# - ELASTICSEARCH_USERNAME=elastic
39-
- ELASTICSEARCH_PASSWORD=$ELASTIC_PASSWORD
40-
- ELASTIC_PORT=${ELASTIC_PORT}
41-
# - ELASTIC_VERSION=$ELASTIC_VERSION
42-
- ELASTICSEARCH_SERVICEACCOUNTTOKEN=${ELASTIC_TOKEN}
43-
- ELASTICSEARCH_URL=http://elasticsearch:${ELASTIC_PORT}
44-
# - ELASTICSEARCH_HOSTS=http://elasticsearch:${ELASTIC_PORT}
24+
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
4525
ports:
4626
- ${KIBANA_PORT}:5601
4727
networks:

elasticdb/example.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ELASTIC_VERSION=8.8.0
2+
ELASTIC_PORT=9200
3+
KIBANA_PORT=5600

elasticdb/kibana/init-env.sh

Lines changed: 0 additions & 51 deletions
This file was deleted.

elasticdb/kibana/init.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

elasticdb/readme.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,2 @@
11
# setup Elastic db:
22

3-
4-
## get kibana token
5-
6-
- elastic db port: 9200
7-
8-
- create user
9-
```
10-
curl -X POST elastic:password "http://localhost:9200/_security/api/realm/internal/user/kibana_user" -H "Content-Type: application/json" -d '{
11-
"username": "kibana_user",
12-
"roles": ["kibana_read_only"]
13-
}'
14-
```
15-
- create token
16-
```
17-
curl -X POST -u elastic:password "localhost:9200/_security/service/elastic/kibana/credential/token/token1?pretty"
18-
```
19-
20-
- delete token
21-
```
22-
curl -X DELETE -u elastic:password "http://localhost:9200/_security/service/elastic/kibana/credential/token/token1"
23-
```
24-
25-
## common issue
26-
27-
- value of "elastic" is forbidden.
28-
29-
https://stackoverflow.com/questions/71615937/elasticsearch-kibana-docker-compose-value-of-elastic-is-forbidden/71937294#71937294
30-
31-
- dockerfile chmod: operation not permitted
32-
https://serverfault.com/questions/967580/chmod-changing-permissions-of-myscript-sh-operation-not-permitted

0 commit comments

Comments
 (0)