<commit_before>FROM ruby:3.0-slim

RUN apt-get update -qq && apt-get install -y build-essential

RUN apt-get install -y nodejs \
  libpq-dev \
  git \
  curl \
  libjemalloc2

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y


RUN ["rm", "-rf", "/var/lib/apt/lists/*"]
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2

SHELL [ "/bin/bash", "-l", "-c" ]

ENV PATH="/root/.cargo/bin:${PATH}"
RUN curl --silent -o-  https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
RUN gem install bundler

RUN NODE_ENV=production
RUN RAILS_ENV=production


WORKDIR /var/www/

# We are copying the Gemfile first, so we can install
# all the dependencies without any issues
# Rails will be installed once you load it from the Gemfile
# This will also ensure that gems are cached and only updated when they change.
COPY Gemfile ./
COPY Gemfile.lock ./
COPY package.json yarn.lock .nvmrc ./

# Install the dependencies.
RUN nvm install && nvm use
RUN bundle check || PATH="/root/.cargo/bin:${PATH}" bundle install --without test development --jobs 20 --retry 5
RUN node --version
RUN npm install -g yarn
RUN yarn install --frozen-lockfile

# We copy all the files from the current directory to our
# /app directory
# Pay close attention to the dot (.)
# The first one will select ALL The files of the current directory,
# The second dot will copy it to the WORKDIR!
COPY . .

RUN RAILS_ENV=production CREATORS_HOST="1" SECRET_KEY_BASE="1" bundle exec rails assets:precompile DB_ADAPTER=nulldb DATABASE_URL='nulldb://nohost'

EXPOSE 3000
ENTRYPOINT [ "./scripts/entrypoint.sh" ]
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb", "-e","${RACK_ENV:-development}"]<commit_msg>ENV var fix for Dockerfile<commit_after>FROM ruby:3.0-slim

RUN apt-get update -qq && apt-get install -y build-essential

RUN apt-get install -y nodejs \
  libpq-dev \
  git \
  curl \
  libjemalloc2

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y


RUN ["rm", "-rf", "/var/lib/apt/lists/*"]
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2

SHELL [ "/bin/bash", "-l", "-c" ]

ENV PATH="/root/.cargo/bin:${PATH}"
RUN curl --silent -o-  https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
RUN gem install bundler

RUN NODE_ENV=production
RUN RAILS_ENV=production


WORKDIR /var/www/

# We are copying the Gemfile first, so we can install
# all the dependencies without any issues
# Rails will be installed once you load it from the Gemfile
# This will also ensure that gems are cached and only updated when they change.
COPY Gemfile ./
COPY Gemfile.lock ./
COPY package.json yarn.lock .nvmrc ./

# Install the dependencies.
RUN nvm install && nvm use
RUN bundle check || PATH="/root/.cargo/bin:${PATH}" bundle install --without test development --jobs 20 --retry 5
RUN node --version
RUN npm install -g yarn
RUN yarn install --frozen-lockfile

# We copy all the files from the current directory to our
# /app directory
# Pay close attention to the dot (.)
# The first one will select ALL The files of the current directory,
# The second dot will copy it to the WORKDIR!
COPY . .

RUN RAILS_ENV=production CREATORS_FULL_HOST="1" SECRET_KEY_BASE="1" bundle exec rails assets:precompile DB_ADAPTER=nulldb DATABASE_URL='nulldb://nohost'

EXPOSE 3000
ENTRYPOINT [ "./scripts/entrypoint.sh" ]
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb", "-e","${RACK_ENV:-development}"]
{'fraction_non_alphanumeric': 0.13073794305636258, 'fraction_numerical': 0.01336432306798373, 'mean_word_length': 3.671641791044776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '6359142', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1159, 'n_words': 405}