-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plus adding a health check
- Loading branch information
Dan Buch
committed
Nov 1, 2018
1 parent
4bc5cda
commit 00b0bc5
Showing
5 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
*.log | ||
/.bundle | ||
/.docker | ||
/.env | ||
/.git | ||
.travis.yml | ||
/.rake_tasks | ||
/.rspec | ||
/.rubocop.yml | ||
/.rubocop_todo.yml | ||
/.simplecov | ||
/.travis.yml | ||
/.vagrant | ||
/CONTRIBUTING.md | ||
/Dockerfile | ||
/Procfile | ||
/README.md | ||
/coverage | ||
/docker-compose.yml | ||
/example_payloads | ||
/examples | ||
/init.rb | ||
/script/build-s3-index-html | ||
/script/docker-build-and-push | ||
/script/handle-docker-config | ||
/script/validate-example-payloads-with-docker | ||
/spec | ||
/tmp | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ WORKDIR /usr/src/app | |
|
||
ARG GITHUB_OAUTH_TOKEN=notset | ||
|
||
RUN bundle config --global frozen 1 | ||
|
||
COPY . . | ||
|
||
RUN bundle install | ||
RUN git describe --always --dirty --tags | tee VERSION | ||
RUN bundle install --frozen --deployment --without='development test' --clean | ||
RUN bundle exec rake assets:precompile GITHUB_OAUTH_TOKEN=$GITHUB_OAUTH_TOKEN | ||
RUN tar -cjf public.tar.bz2 public && rm -rf public | ||
|
||
FROM ruby:2.5.3-slim | ||
LABEL maintainer Travis CI GmbH <[email protected]> | ||
|
@@ -18,7 +18,9 @@ ENV TRAVIS_BUILD_DUMP_BACKTRACE true | |
ENV PORT 4000 | ||
|
||
COPY --from=builder /usr/src/app /usr/src/app | ||
COPY --from=builder /usr/local/bundle /usr/local/bundle | ||
COPY --from=builder /root/.bundle /root/.bundle | ||
COPY --from=builder /usr/local/bundle/config /usr/local/bundle/config | ||
RUN rm -rf .git | ||
|
||
HEALTHCHECK --interval=5s CMD script/healthcheck | ||
EXPOSE 4000/tcp | ||
CMD ["script/server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env ruby | ||
require 'net/http' | ||
require 'uri' | ||
Net::HTTP.get( | ||
URI("http://localhost:#{ENV.fetch('PORT', '4000')}/uptime") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters