From 54a9aee61ab9bc84c27117e3d0501e99cc8dd304 Mon Sep 17 00:00:00 2001 From: Michael Kohl Date: Thu, 20 Feb 2020 20:37:33 +0700 Subject: [PATCH] Add Elasticsearch to GitPod (#6198) [deploy] * Add Elasticsearch to GitPod * Add second ES port --- .gitpod.dockerfile | 12 ++++++++++-- .gitpod.yml | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile index 9e327f5eb..f9537a391 100644 --- a/.gitpod.dockerfile +++ b/.gitpod.dockerfile @@ -6,6 +6,14 @@ RUN bash -lc "rvm install ruby-$RUBY_VERSION && rvm use ruby-$RUBY_VERSION --def # Install Redis. RUN sudo apt-get update \ - && sudo apt-get install -y \ + && sudo apt-get install -y \ redis-server \ - && sudo rm -rf /var/lib/apt/lists/* + && sudo rm -rf /var/lib/apt/lists/* + +# Install Elasticsearch +ARG ES_REPO=https://artifacts.elastic.co/downloads/elasticsearch +ARG ES_ARCHIVE=elasticsearch-oss-7.5.2-linux-x86_64.tar.gz +RUN wget "${ES_REPO}/${ES_ARCHIVE}" \ + && wget "${ES_REPO}/${ES_ARCHIVE}.sha512" \ + && shasum -a 512 -c ${ES_ARCHIVE}.sha512 \ + && tar -xzf ${ES_ARCHIVE} diff --git a/.gitpod.yml b/.gitpod.yml index 23710d2c1..de0215e77 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -9,8 +9,13 @@ ports: onOpen: ignore - port: 6379 onOpen: ignore + - port: 9200 + onOpen: ignore + - port: 9300 + onOpen: ignore tasks: - command: redis-server + - command: /home/gitpod/elasticsearch-7.5.2/bin/elasticsearch - init: > cp config/sample_application.yml config/application.yml && bin/setup 2>/dev/null || true