Skip to content

Commit 8034eef

Browse files
author
Simone Scarduzio
committed
docker ES configuration
1 parent 428ea36 commit 8034eef

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

src/test/testconf.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
cluster:
2+
name: elasticsearch
3+
4+
index:
5+
number_of_replicas: 0
6+
number_of_shards: 1
7+
analysis:
8+
analyzer:
9+
eulang:
10+
type: custom
11+
tokenizer: standard
12+
filter: [standard, lowercase, asciifolding]
13+
location:
14+
type: custom
15+
tokenizer: standard
16+
filter: [standard, lowercase, asciifolding]
17+
18+
transport.tcp.port : 9310
19+
20+
readonlyrest:
21+
enable: true
22+
response_if_req_forbidden: <h1>Forbidden</h1>
23+
access_control_rules:
24+
- name: ALLOW MARVEL
25+
type: allow
26+
methods: [POST]
27+
# the question mark should be a fwd slash, but something goes wrong if I use it. Bug?
28+
uri_re: '^?\.marvel.*_search.*'
29+
- name: readonly
30+
type: allow
31+
methods: [OPTIONS,GET]
32+
maxBodyLength: 0

test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cat Dockerfile.tpl |sed -e "s/\${VERSION}/$VERSION/" -e "s/\${PLUGIN_VERSION}/$P
1818
#PLUGIN_ZIP=elasticsearch-readonlyrest-$VERSION.zip
1919

2020
# Populate the conf files with test yml
21-
cp src/test/three_rules.yml docker/elasticsearch.yml
21+
cp src/test/testconf.yml docker/elasticsearch.yml
2222
cp target/elasticsearch-readonlyrest-$VERSION.zip docker
2323

2424
# Build and launch docker container
@@ -29,4 +29,4 @@ docker run -d --net=host readonlyrest:$VERSION
2929
rm -rf docker
3030

3131
docker rm -f `docker ps |grep readonlyrest| awk '{print $1}'`
32-
docker run --net host readonlyrest:$VERSION
32+
docker run --net=host readonlyrest:$VERSION

0 commit comments

Comments
 (0)