Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
*: healthcheck GTM, Coord, Data (not Proxy)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredpixel committed May 8, 2017
1 parent a82ce34 commit 9510f57
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.coord.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ ENV \
PG_COORD_HOST=0.0.0.0 \
PG_COORD_PORT=5432 \
PG_GTM_HOST=db_gtm_1 \
PG_GTM_PORT=6666
PG_GTM_PORT=6666 \
PG_USER_HEALTHCHECK=_healthcheck
#-------------------------------------------------------------------------------
COPY coord/init.sh .

Expand All @@ -111,4 +112,6 @@ CMD postgres \
--coordinator

EXPOSE ${PG_COORD_PORT}

HEALTHCHECK CMD createuser ${PG_USER_HEALTHCHECK} ; createdb ${PG_USER_HEALTHCHECK} ; psql -h ${PG_COORD_HOST} -p ${PG_COORD_PORT} -U ${PG_USER_HEALTHCHECK} -c 'SELECT version()' || false
#===============================================================================
5 changes: 4 additions & 1 deletion Dockerfile.data.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ ENV \
PG_DATA_HOST=0.0.0.0 \
PG_DATA_PORT=5432 \
PG_GTM_HOST=db_gtm_1 \
PG_GTM_PORT=6666
PG_GTM_PORT=6666 \
PG_USER_HEALTHCHECK=_healthcheck
#-------------------------------------------------------------------------------
COPY data/init.sh .

Expand All @@ -111,4 +112,6 @@ CMD postgres \
--datanode

EXPOSE ${PG_DATA_PORT}

HEALTHCHECK CMD psql -h ${PG_DATA_HOST} -p ${PG_DATA_PORT} -U ${PG_USER_HEALTHCHECK} -c 'SELECT version()' || false
#===============================================================================
2 changes: 2 additions & 0 deletions Dockerfile.gtm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,6 @@ CMD gtm \
-l /dev/stdout

EXPOSE ${PG_GTM_PORT}

HEALTHCHECK CMD curl -fs http://${PG_GTM_HOST}:${PG_GTM_PORT} || false
#===============================================================================

0 comments on commit 9510f57

Please sign in to comment.