Skip to content

Commit

Permalink
adding docker native healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
brentley committed Mar 9, 2018
1 parent 0efe815 commit 9689da7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ruby:2.5-slim
COPY Gemfile Gemfile.lock /usr/src/app/
WORKDIR /usr/src/app

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

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

0 comments on commit 9689da7

Please sign in to comment.