<commit_before># Build for install dependency RubyGems
FROM ruby:2.7.0-alpine3.11 AS bundle

COPY Gemfile .
COPY Gemfile.lock .

RUN set -ex \
    && apk add --update --no-cache build-base=0.5-r1 \
    && bundle config frozen true \
    && bundle install --jobs=4 --without="test:development" \
    && rm -rf "${BUNDLE_PATH}/cache/*"

# Build for Sinatra app
FROM ruby:2.7.0-alpine3.11
COPY --from=bundle ${BUNDLE_PATH} ${BUNDLE_PATH}

ENV RACK_ENV=deployment

WORKDIR /usr/src/app
COPY . .

EXPOSE 8080
ENTRYPOINT ["bundle"]
CMD ["exec", "rackup", "--host", "0.0.0.0", "-p", "8080"]<commit_msg>Add HEALTHCHECK<commit_after># Build for install dependency RubyGems
FROM ruby:2.7.0-alpine3.11 AS bundle

COPY Gemfile .
COPY Gemfile.lock .

RUN set -ex \
    && apk add --update --no-cache curl=7.67.0-r0 build-base=0.5-r1 \
    && bundle config frozen true \
    && bundle install --jobs=4 --without="test:development" \
    && rm -rf "${BUNDLE_PATH}/cache/*"

# Build for Sinatra app
FROM ruby:2.7.0-alpine3.11
COPY --from=bundle ${BUNDLE_PATH} ${BUNDLE_PATH}

ENV RACK_ENV=deployment

WORKDIR /usr/src/app
COPY . .

EXPOSE 8080
ENTRYPOINT ["bundle"]
CMD ["exec", "rackup", "--host", "0.0.0.0", "-p", "8080"]

HEALTHCHECK CMD curl -s -S -o /dev/null http:/0:8080 || exit 1
{'fraction_non_alphanumeric': 0.17151848937844216, 'fraction_numerical': 0.05271439811172305, 'mean_word_length': 3.2684563758389262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1481906', 'n_tokens_mistral': 532, 'n_tokens_neox': 490, 'n_words': 129}