Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go bump to 1.17, add docker-compose #414

Merged
merged 7 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _examples/xkcdsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# $ docker run -it --network elasticsearch --name xkcdsearch-demo --publish 8000:8000 --rm elastic/go-elasticsearch-demo-xkcdsearch
#
FROM golang:1.11-alpine AS Builder
FROM golang:1.17-alpine AS Builder

WORKDIR /go-elasticsearch-demo-xkcdsearch
COPY . .
Expand Down
33 changes: 33 additions & 0 deletions _examples/xkcdsearch/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3.5'
services:
search_api:
container_name: 'xkcd-search'
build: .
restart: 'on-failure'
ports:
- '8000:8000'
depends_on:
- elasticsearch
networks:
- elastic
elasticsearch:
container_name: 'es01'
image: 'docker.elastic.co/elasticsearch/elasticsearch:8.1-SNAPSHOT'
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
ports:
- '9200:9200'
networks:
- elastic
volumes:
- es01:/usr/share/elasticsearch/data

volumes:
es01:
driver: local

networks:
elastic:
driver: bridge
11 changes: 7 additions & 4 deletions _examples/xkcdsearch/go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
module github.com/elastic/go-elasticsearch/v8/_examples/xkcdsearch

go 1.11
go 1.17

replace github.com/elastic/go-elasticsearch/v8 => ../..

require (
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27 // indirect
github.com/elastic/go-elasticsearch/v8 v8.0.0-20210817150010-57d659deaca7
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/rs/zerolog v1.11.0
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3 // indirect
golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
)

require (
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35 // indirect
)
2 changes: 2 additions & 0 deletions _examples/xkcdsearch/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27 h1:O58SwZ7pdt7Lzy8JqpJubJlgDbr9jVV7ro4HFPvaZDw=
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211202110751-50105067ef27/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI=
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c h1:onA2RpIyeCPvYAj1LFYiiMTrSpqVINWMfYFRS7lofJs=
github.com/elastic/elastic-transport-go/v8 v8.0.0-20211216131617-bbee439d559c/go.mod h1:87Tcz8IVNe6rVSLdBux1o/PEItLtyabHU3naC7IoqKI=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/rs/zerolog v1.11.0 h1:DRuq/S+4k52uJzBQciUcofXx45GrMC6yrEbb/CoK6+M=
Expand Down