From 09425905ec9767cd3992677025878afbc813a3a2 Mon Sep 17 00:00:00 2001 From: Martin Danielsson Date: Wed, 8 Feb 2017 10:35:16 +0100 Subject: [PATCH] Update to Kong 0.9.9, replace dockerize with wait-for-it. --- Dockerfile.template | 7 +++---- startup.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index 676a4fb..b9123a1 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,6 +1,5 @@ -FROM kong:0.9.7 +FROM kong:0.9.9 -ENV DOCKERIZE_VERSION v0.2.0 ENV KONG_PG_HOST kong-database ENV KONG_PG_USER kong ENV KONG_PG_PASSWORD kong @@ -10,8 +9,8 @@ RUN yum install -y epel-release && yum install -y wget \\ && yum clean all \\ && wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 \\ && chmod +x /usr/local/bin/dumb-init \\ - && wget -nv 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 + && wget -O /usr/local/bin/wait-for-it.sh https://raw.githubusercontent.com/vishnubob/wait-for-it/55c54a5abdfb32637b563b28cc088314b162195e/wait-for-it.sh \\ + && chmod +x /usr/local/bin/wait-for-it.sh COPY templates/nginx_kong.lua /root/nginx_kong.lua COPY startup.sh /startup.sh diff --git a/startup.sh b/startup.sh index e9cc4de..afc8d76 100755 --- a/startup.sh +++ b/startup.sh @@ -20,4 +20,4 @@ fi echo Using kong database host: $KONG_PG_HOST -dockerize -wait tcp://kong-database:5432 kong start +wait-for-it.sh -h $KONG_PG_HOST -p 5432 -t 30 -- kong start