File tree Expand file tree Collapse file tree 4 files changed +43
-5
lines changed
Expand file tree Collapse file tree 4 files changed +43
-5
lines changed Original file line number Diff line number Diff line change 33#
44# $ docker run -it --network elasticsearch --name xkcdsearch-demo --publish 8000:8000 --rm elastic/go-elasticsearch-demo-xkcdsearch
55#
6- FROM golang:1.11 -alpine AS Builder
6+ FROM golang:1.17 -alpine AS Builder
77
88WORKDIR /go-elasticsearch-demo-xkcdsearch
99COPY . .
Original file line number Diff line number Diff line change 1+ version : ' 3.5'
2+ services :
3+ search_api :
4+ container_name : ' xkcd-search'
5+ build : .
6+ restart : ' on-failure'
7+ ports :
8+ - ' 8000:8000'
9+ depends_on :
10+ - elasticsearch
11+ networks :
12+ - elastic
13+ elasticsearch :
14+ container_name : ' es01'
15+ image : ' docker.elastic.co/elasticsearch/elasticsearch:8.1-SNAPSHOT'
16+ environment :
17+ - discovery.type=single-node
18+ - " ES_JAVA_OPTS=-Xms512m -Xmx512m"
19+ - xpack.security.enabled=false
20+ ports :
21+ - ' 9200:9200'
22+ networks :
23+ - elastic
24+ volumes :
25+ - es01:/usr/share/elasticsearch/data
26+
27+ volumes :
28+ es01 :
29+ driver : local
30+
31+ networks :
32+ elastic :
33+ driver : bridge
Original file line number Diff line number Diff line change 11module github.com/elastic/go-elasticsearch/v8/_examples/xkcdsearch
22
3- go 1.11
3+ go 1.17
44
55replace github.com/elastic/go-elasticsearch/v8 => ../..
66
77require (
8- github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27 // indirect
98 github.com/elastic/go-elasticsearch/v8 v8.0.0-20210817150010-57d659deaca7
10- github.com/inconshreveable/mousetrap v1.0.0 // indirect
119 github.com/rs/zerolog v1.11.0
1210 github.com/spf13/cobra v0.0.3
13- github.com/spf13/pflag v1.0.3 // indirect
1411 golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
12+ )
13+
14+ require (
15+ github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c // indirect
16+ github.com/inconshreveable/mousetrap v1.0.0 // indirect
17+ github.com/spf13/pflag v1.0.3 // indirect
1518 golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35 // indirect
1619)
Original file line number Diff line number Diff line change 11github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27 h1:O58SwZ7pdt7Lzy8JqpJubJlgDbr9jVV7ro4HFPvaZDw =
22github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27 /go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI =
3+ github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c h1:onA2RpIyeCPvYAj1LFYiiMTrSpqVINWMfYFRS7lofJs =
4+ github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c /go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI =
35github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM =
46github.com/inconshreveable/mousetrap v1.0.0 /go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8 =
57github.com/rs/zerolog v1.11.0 h1:DRuq/S+4k52uJzBQciUcofXx45GrMC6yrEbb/CoK6+M =
You can’t perform that action at this time.
0 commit comments