Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Commit 9689da7

Browse files
committed
adding docker native healthcheck
1 parent 0efe815 commit 9689da7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ruby:2.5-slim
33
COPY Gemfile Gemfile.lock /usr/src/app/
44
WORKDIR /usr/src/app
55

6-
RUN apt-get update && apt-get -y install libgmp3-dev ruby-dev build-essential libsqlite3-dev && \
6+
RUN apt-get update && apt-get -y install curl libgmp3-dev ruby-dev build-essential libsqlite3-dev && \
77
bundle install && \
88
apt-get autoremove -y --purge && \
99
apt-get remove -y --auto-remove --purge ruby-dev libgmp3-dev build-essential libsqlite3-dev && \
@@ -17,5 +17,7 @@ RUN chmod +x /usr/src/app/startup.sh
1717
# RUN bundle update
1818
# RUN rm -vf /usr/src/app/Gemfile.lock
1919

20+
HEALTHCHECK --interval=10s --timeout=3s \
21+
CMD curl -f -s http://localhost:3000/health/ || exit 1
2022
EXPOSE 3000
2123
ENTRYPOINT ["bash","/usr/src/app/startup.sh"]

0 commit comments

Comments
 (0)