<commit_before>FROM ubuntu

RUN apt-get update
#RUN apt-get upgrade
RUN apt-get install -y libapache2-mod-php5 php5-gd php5-mysql git

WORKDIR /var/www
RUN git clone https://github.com/fc2blog/blog.git && \
  chown www-data:www-data blog/app/temp blog/public/uploads && \
  sed \
    -e "s/'localhost'/getenv('MYSQL_PORT_3306_TCP_ADDR')/" \
    -e "s/your user name/@DB_USER@/" \
    -e "s/your password/@DB_PASSWORD@/" \
    -e "s/your database name/@DB_DATABASE@/" \
    -e "s/'domain'/\$_SERVER['HTTP_HOST']/" \
    -e "s/0123456789abcdef/@PASSWORD_SALT@/" \
    blog/public/config.php.sample > blog/public/config.php && \
  ( \
    echo "<VirtualHost *:80>" && \
    echo "  DocumentRoot /var/www/blog/public" && \
    echo "  <Directory /var/www/blog/public>" && \
    echo "    AllowOverride All" && \
    echo "    Order allow,deny" && \
    echo "    Allow from all" && \
    echo "  </Directory>" && \
    echo "</VirtualHost>" \
  ) > /etc/apache2/sites-available/fc2blog && \
  a2ensite fc2blog && \
  a2dissite default && \
  a2enmod rewrite<commit_msg>Add Japanese locale to ubuntu build<commit_after>FROM ubuntu

RUN apt-get update
#RUN apt-get upgrade
RUN apt-get install -y libapache2-mod-php5 php5-gd php5-mysql git

WORKDIR /var/www
RUN git clone https://github.com/fc2blog/blog.git && \
  chown www-data:www-data blog/app/temp blog/public/uploads && \
  sed \
    -e "s/'localhost'/getenv('MYSQL_PORT_3306_TCP_ADDR')/" \
    -e "s/your user name/@DB_USER@/" \
    -e "s/your password/@DB_PASSWORD@/" \
    -e "s/your database name/@DB_DATABASE@/" \
    -e "s/'domain'/\$_SERVER['HTTP_HOST']/" \
    -e "s/0123456789abcdef/@PASSWORD_SALT@/" \
    blog/public/config.php.sample > blog/public/config.php && \
  ( \
    echo "<VirtualHost *:80>" && \
    echo "  DocumentRoot /var/www/blog/public" && \
    echo "  <Directory /var/www/blog/public>" && \
    echo "    AllowOverride All" && \
    echo "    Order allow,deny" && \
    echo "    Allow from all" && \
    echo "  </Directory>" && \
    echo "</VirtualHost>" \
  ) > /etc/apache2/sites-available/fc2blog && \
  a2ensite fc2blog && \
  a2dissite default && \
  a2enmod rewrite && \
  locale-gen ja
{'fraction_non_alphanumeric': 0.17395306028531984, 'fraction_numerical': 0.024850437183617118, 'mean_word_length': 2.552287581699346, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, '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': '2326930', 'n_tokens_mistral': 854, 'n_tokens_neox': 807, 'n_words': 158}