<commit_before>FROM openshift/ruby-22-centos7

USER root

RUN yum update -y && \
    yum -y install httpd httpd-devel apr-devel apr-util-devel \
                   ImageMagick-c++ ImageMagick-c++-devel transifex-client sqlite3 && \
    yum clean all -y

RUN /bin/bash -c "gem install passenger --no-ri --no-rdoc && \
    export PATH=$PATH:/opt/rh/rh-ruby22/root/usr/local/bin && \
    passenger-install-apache2-module --auto --languages ruby && \
    passenger-config validate-install"

ENV RAILS_ENV=production \
    RAILS_ROOT=/opt/app-root/src

# ADD app /opt/app-root/src
ADD app /tmp/src
ADD httpd /etc/httpd
# disable digest_module
RUN sed -i "s/LoadModule auth_digest_module/#LoadModule auth_digest_module/" /etc/httpd/conf.modules.d/00-base.conf

RUN chgrp -R 0 ./ && \
    chmod -R g+rw ./ && \
    find ./ -type d -exec chmod g+x {} + && \
    chown -R 1001:0 ./

USER 1001

RUN mkdir -p /opt/app-root/httpd/logs

RUN $STI_SCRIPTS_PATH/assemble
    

ENV APACHE_RUN_USER 1001 
ENV APACHE_PID_FILE /opt/app-root/httpd.pid 

CMD export APACHE_RUN_USER=$(id -u) && /usr/sbin/apachectl -DFOREGROUND<commit_msg>create dir earlier<commit_after>FROM openshift/ruby-22-centos7

USER root

RUN yum update -y && \
    yum -y install httpd httpd-devel apr-devel apr-util-devel \
                   ImageMagick-c++ ImageMagick-c++-devel transifex-client sqlite3 && \
    yum clean all -y

RUN /bin/bash -c "gem install passenger --no-ri --no-rdoc && \
    export PATH=$PATH:/opt/rh/rh-ruby22/root/usr/local/bin && \
    passenger-install-apache2-module --auto --languages ruby && \
    passenger-config validate-install"

ENV RAILS_ENV=production \
    RAILS_ROOT=/opt/app-root/src

# ADD app /opt/app-root/src
ADD app /tmp/src
ADD httpd /etc/httpd
# disable digest_module
RUN sed -i "s/LoadModule auth_digest_module/#LoadModule auth_digest_module/" /etc/httpd/conf.modules.d/00-base.conf

RUN mkdir -p /opt/app-root/httpd/logs

RUN chgrp -R 0 ./ && \
    chmod -R g+rw ./ && \
    find ./ -type d -exec chmod g+x {} + && \
    chown -R 1001:0 ./

USER 1001

RUN $STI_SCRIPTS_PATH/assemble
    

ENV APACHE_RUN_USER 1001 
ENV APACHE_PID_FILE /opt/app-root/httpd.pid 

CMD export APACHE_RUN_USER=$(id -u) && /usr/sbin/apachectl -DFOREGROUND
{'fraction_non_alphanumeric': 0.1358962896736701, 'fraction_numerical': 0.02056325435851587, 'mean_word_length': 2.7237936772046587, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4382569', 'n_tokens_mistral': 903, 'n_tokens_neox': 854, 'n_words': 193}