<commit_before>FROM ruby:2.3

MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        nodejs \
        postgresql-client \
    && rm -rf /var/lib/apt/lists/*

RUN echo "gem: --no-rdoc --no-ri" >> ~/.gemrc

ENV RAILS_ENV production
ENV LISTEN_ON 8000

WORKDIR /tmp
COPY ./Gemfile Gemfile
COPY ./Gemfile.lock Gemfile.lock
RUN bundle install --without development test --jobs 20 --retry 5

RUN mkdir -p /opt/app \
	&& mkdir -p /tmp/pids \
	&& mkdir -p /tmp/sockets
WORKDIR /opt/app
COPY ./ /opt/app

RUN rake assets:precompile

VOLUME /opt/app/public/assets
VOLUME /opt/app/public

CMD rake db:migrate \
  && rm -rf /opt/app/tmp/pids/unicorn.pid \
  && bundle exec unicorn -c config/unicorn.rb
<commit_msg>fixed error in precompiling assets<commit_after>FROM ruby:2.3

MAINTAINER <NAME> <<EMAIL>>

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        nodejs \
        postgresql-client \
    && rm -rf /var/lib/apt/lists/*

RUN echo "gem: --no-rdoc --no-ri" >> ~/.gemrc

ENV RAILS_ENV production
ENV LISTEN_ON 8000

WORKDIR /tmp
COPY ./Gemfile Gemfile
COPY ./Gemfile.lock Gemfile.lock
RUN bundle install --without development test --jobs 20 --retry 5

RUN mkdir -p /opt/app \
	&& mkdir -p /tmp/pids \
	&& mkdir -p /tmp/sockets
WORKDIR /opt/app
COPY ./ /opt/app

RUN DATABASE_URL=postgres://user:pass@127.0.0.1/does_not_exist_dbname /bin/sh -c 'bundle exec rake assets:precompile'

VOLUME /opt/app/public/assets
VOLUME /opt/app/public

CMD rake db:migrate \
  && rm -rf /opt/app/tmp/pids/unicorn.pid \
  && bundle exec unicorn -c config/unicorn.rb

{'fraction_non_alphanumeric': 0.14083640836408365, 'fraction_numerical': 0.014760147601476014, 'mean_word_length': 2.706150341685649, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1107984', 'n_tokens_mistral': 655, 'n_tokens_neox': 627, 'n_words': 167}