Skip to content

Commit

Permalink
fix: use pg_isready instead of netcat
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Clemens committed Jul 12, 2018
1 parent 5a9621f commit fce1d86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .docker/run/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM jkcclemens/paste

RUN $HOME/.cargo/bin/cargo install diesel_cli --no-default-features --features postgres

RUN apt-get install --assume-yes netcat
RUN apt-get install --assume-yes --no-install-recommends postgresql-client

ADD run.sh /run.sh

Expand Down
2 changes: 1 addition & 1 deletion .docker/run/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

source "$HOME/.bashrc"

while ! nc -z postgres 5432; do
while ! pg_isready -h postgres -p 5432 -q; do
sleep 1
done

Expand Down

0 comments on commit fce1d86

Please sign in to comment.