Merge remote-tracking branch '7digital/feature/docker-wait-for-mysql'

This commit is contained in:
Khanh Ngo 2018-07-05 10:44:56 +07:00
commit c43743aac0
2 changed files with 13 additions and 1 deletions

View File

@ -22,6 +22,9 @@ RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.lis
RUN apt-get update -y
RUN apt-get install -y yarn
# Install Netcat for DB healthcheck
RUN apt-get install -y netcat
# lib for building mysql db driver
RUN apt-get install -y libmysqlclient-dev

View File

@ -1,5 +1,14 @@
#!/bin/sh
# Wait for us to be able to connect to MySQL before proceeding
until nc -zv \
$PDA_DB_HOST \
3306;
do
echo "MySQL ($PDA_DB_HOST) is unavailable - sleeping"
sleep 1
done
cd /powerdns-admin
if [ ! -d "/powerdns-admin/migrations" ]; then