Skip to content

Commit

Permalink
Include ES service in docker compose for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alesr committed Jul 9, 2023
1 parent bd232dc commit e79d205
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ tasks:
sh: docker-compose port cassandra 9042
NATS_HOST:
sh: docker-compose port nats 4222
ELASTICSEARCH_HOST:
sh: docker-compose port elasticsearch 9200

env:
HEALTH_GO_PG_PQ_DSN: 'postgres://test:test@{{.PG_PQ_HOST}}/test?sslmode=disable'
Expand All @@ -68,3 +70,4 @@ tasks:
HEALTH_GO_INFLUXDB_URL: 'http://{{.INFLUX_HOST}}'
HEALTH_GO_CASSANDRA_HOST: '{{.CASSANDRA_HOST}}'
HEALTH_GO_NATS_DSN: 'nats://{{.NATS_HOST}}'
HEALTH_GO_ES_DSN: '{{.ELASTICSEARCH_HOST}}'
15 changes: 14 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,17 @@ services:
image: nats:2.9.11
command: "-js -sd /data"
ports:
- "4222:4222"
- "4222:4222"

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
ports:
- "9200:9200"
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=test
healthcheck:
test: ["CMD-SHELL", "curl -k -u elastic:test https://localhost:9200 >/dev/null || exit 1"]
interval: 15s
timeout: 5s
retries: 5

0 comments on commit e79d205

Please sign in to comment.