Loading CHANGELOG.md +5 −0 Original line number Diff line number Diff line # `nginx-sidecar` changelog ## 0.2.1 - Wait for the application to pass healthchecks before listening (and accepting) downstream healthchecks. ## 0.2.0 - Pass original request scheme to consuming application Loading Dockerfile +2 −0 Original line number Diff line number Diff line FROM nginx:stable RUN apt update && apt install -y curl COPY nginx.conf.template /etc/nginx/nginx.conf.template COPY start.sh /usr/bin/start.sh RUN chmod a+x /usr/bin/start.sh Loading VERSION +1 −1 Original line number Diff line number Diff line 0.2.0 0.2.1 start.sh +5 −0 Original line number Diff line number Diff line Loading @@ -6,5 +6,10 @@ set -ex # so we substitute at run time /bin/sed -e "s/<NGINX_PORT>/${NGINX_PORT}/g" -e "s/<APP_PORT>/${APP_PORT}/g" /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf # Wait for the application to start before accepting ALB requests. while sleep 2; do curl http://app:${APP_PORT}${HEALTHCHECK_PATH:-/health} && break done # run in foreground as pid 1 exec /usr/sbin/nginx -g 'daemon off;' -c /etc/nginx/nginx.conf Loading
CHANGELOG.md +5 −0 Original line number Diff line number Diff line # `nginx-sidecar` changelog ## 0.2.1 - Wait for the application to pass healthchecks before listening (and accepting) downstream healthchecks. ## 0.2.0 - Pass original request scheme to consuming application Loading
Dockerfile +2 −0 Original line number Diff line number Diff line FROM nginx:stable RUN apt update && apt install -y curl COPY nginx.conf.template /etc/nginx/nginx.conf.template COPY start.sh /usr/bin/start.sh RUN chmod a+x /usr/bin/start.sh Loading
start.sh +5 −0 Original line number Diff line number Diff line Loading @@ -6,5 +6,10 @@ set -ex # so we substitute at run time /bin/sed -e "s/<NGINX_PORT>/${NGINX_PORT}/g" -e "s/<APP_PORT>/${APP_PORT}/g" /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf # Wait for the application to start before accepting ALB requests. while sleep 2; do curl http://app:${APP_PORT}${HEALTHCHECK_PATH:-/health} && break done # run in foreground as pid 1 exec /usr/sbin/nginx -g 'daemon off;' -c /etc/nginx/nginx.conf