Add health check to pgsql docker image

This commit is contained in:
Jan Dittberner 2019-07-05 21:11:39 +02:00
부모 d231f90c90
커밋 dc96c9472b
3개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제

2
.dockerignore Normal file
파일 보기

@ -0,0 +1,2 @@
.git
.idea

1
.gitignore vendored Normal file
파일 보기

@ -0,0 +1 @@
.idea/

파일 보기

@ -13,6 +13,7 @@ EXPOSE 5432
VOLUME /var/lib/postgresql/
COPY pg_hba.conf /etc/postgresql/9.6/main/pg_hba.conf
COPY startup.sh /srv/
HEALTHCHECK CMD pg_isready -d postgres
ENTRYPOINT ["dumb-init"]
CMD "/srv/startup.sh"