<commit_before>FROM ruby:2.3.0

RUN mkdir -p /srv/app
WORKDIR /srv/app

ADD Gemfile /srv/app/
ADD Gemfile.lock /srv/app/
RUN bundle install

ADD . /srv/app

ARG RAILS_RELATIVE_URL_ROOT
ENV RAILS_RELATIVE_URL_ROOT=$RAILS_RELATIVE_URL_ROOT

RUN RAILS_ENV=production bin/rake assets:precompile

EXPOSE 3000

CMD ["bin/unicorn", "-p", "3000", "-c", "config/unicorn.rb"]

ARG version
RUN echo $version > /srv/app/public/version<commit_msg>Strip /assets/ from compiled css in Docker<commit_after>FROM ruby:2.3.0

RUN mkdir -p /srv/app
WORKDIR /srv/app

ADD Gemfile /srv/app/
ADD Gemfile.lock /srv/app/
RUN bundle install

ADD . /srv/app

RUN RAILS_ENV=production bin/rake assets:precompile

# Strip out /assets/ from all compiled css, leaving all css-referenced asset paths relative to the
# stylesheets themselves.
# This allows the built Docker image to be used with any RAILS_RELATIVE_URL_ROOT.
RUN for f in $(grep -rl /assets/ public/assets/*.css); \
    do sed -i s#/assets/##g $f && gzip --keep --force $f; done

EXPOSE 3000

CMD ["bin/unicorn", "-p", "3000", "-c", "config/unicorn.rb"]

ARG version
RUN echo $version > /srv/app/public/version
{'fraction_non_alphanumeric': 0.1242344706911636, 'fraction_numerical': 0.019247594050743656, 'mean_word_length': 3.888888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '161606', 'n_tokens_mistral': 448, 'n_tokens_neox': 428, 'n_words': 130}