Add dockerize to wait for elasticsearch to boot during test runs

This commit is contained in:
Lars Henrik Mai 2020-01-16 12:56:35 +01:00
parent dc3a97d3b8
commit 4d4ed38dfc
2 changed files with 7 additions and 1 deletions

View file

@ -9,6 +9,12 @@ RUN apt-get update && \
apt-get install -y build-essential zlib1g-dev libsqlite3-dev nodejs npm \
libxml2-dev libxslt1-dev pkg-config google-chrome-stable
ENV DOCKERIZE_VERSION v0.6.1
RUN curl -sSLO https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
RUN mkdir -p /app
WORKDIR /tmp

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
bundle exec rspec
dockerize -wait $ELASTICSEARCH_URL -timeout 30s bundle exec rspec