<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="dockerCRE" default="rebuild">


     <target name="rebuild" depends="init, stop, copyReplace, start"/>
     <target name="build-new" depends="init, copyReplace"/>
     <target name="kill-all" depends="stop, kill"/>
     


     <target name="clone" description="Clones Repository for CRE environment from github (to remember only)">
       <exec dir="/data" executable="git">
          <arg line="clone https://github.com/tambora-org/dockerCRE.git"/>
       </exec>
    </target>
  

    <target name="init" description="Initialize environment">
        <property environment="env"/>
 

        <condition property="cre-domain" value="${env.CRE_DOMAIN}" else="example.com">
            <isset property="env.CRE_DOMAIN" /> 
        </condition>
        <condition property="cre-username" value="${env.CRE_USERNAME}" else="username">
            <isset property="env.CRE_USERNAME" />
        </condition>
        <condition property="cre-password" value="${env.CRE_PASSWORD}" else="password">
            <isset property="env.CRE_PASSWORD" />
        </condition>
        <condition property="cre-dbname" value="${env.CRE_DBNAME}" else="dbname">
            <isset property="env.CRE_DBNAME" />
        </condition>

        <condition property="cre-port-http" value="${env.CRE_PORT_HTTP}" else="80">
            <isset property="env.CRE_PORT_HTTP" />
        </condition>
        <condition property="cre-port-https" value="${env.CRE_PORT_HTTPS}" else="443">
            <isset property="env.CRE_PORT_HTTPS" />
        </condition>


        <condition property="cre-upload-size" value="${env.CRE_UPLOAD_SIZE}" else="100M">
            <isset property="env.CRE_UPLOAD_SIZE" />
        </condition>
    </target>


    <target name="copyReplace" description="Copy template files and replace some strings">
         <copy file="proxy/nginx.conf.template" tofile="proxy/nginx.conf" overwrite="true" />
         <replace file="proxy/nginx.conf" token="example.com" value="${cre-domain}"/>

         <copy file="nextcloud/config/config.php.template" tofile="nextcloud/config/autoconfig.php" overwrite="true" />
         <replace file="nextcloud/config/autoconfig.php" token="example.com" value="${cre-domain}"/>
         <replace file="nextcloud/config/autoconfig.php" token="klingaman" value="${cre-username}"/>
         <replace file="nextcloud/config/autoconfig.php" token="pinatubo" value="${cre-password}"/>
         <replace file="nextcloud/config/autoconfig.php" token="sumatra" value="${cre-dbname}"/>

         <copy file="docker-compose.yml.template" tofile="docker-compose.yml" overwrite="true" />
         <replace file="docker-compose.yml" token="klingaman" value="${cre-username}"/>
         <replace file="docker-compose.yml" token="pinatubo" value="${cre-password}"/>
         <replace file="docker-compose.yml" token="sumatra" value="${cre-dbname}"/>

    </target>

   <target name="start">
        <exec executable="docker-compose">
           <arg line="up -d" />
        </exec>
   </target>


   <target name="stop" description="Stops all containers">
         <exec executable="docker">
            <arg line="stop nginx2 php2 proxy2 postgres2 nextcloud2 nginx2nc" />
         </exec>
         <exec executable="docker">
            <arg line="rm nginx2 php2 proxy2 postgres2 nextcloud2 nginx2nc" />
         </exec>
   </target>


    <target name="kill" description="All data (inclusive database, etc) is removed">
         <delete dir="postgres/data" />
    </target>

<commit_msg>Alternatively use other ports (i.e. if already used from something else...)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="dockerCRE" default="rebuild">


     <target name="rebuild" depends="init, stop, copyReplace, start"/>
     <target name="build-new" depends="init, copyReplace"/>
     <target name="kill-all" depends="stop, kill"/>
     


     <target name="clone" description="Clones Repository for CRE environment from github (to remember only)">
       <exec dir="/data" executable="git">
          <arg line="clone https://github.com/tambora-org/dockerCRE.git"/>
       </exec>
    </target>
  

    <target name="init" description="Initialize environment">
        <property environment="env"/>
 

        <condition property="cre-domain" value="${env.CRE_DOMAIN}" else="example.com">
            <isset property="env.CRE_DOMAIN" /> 
        </condition>
        <condition property="cre-username" value="${env.CRE_USERNAME}" else="username">
            <isset property="env.CRE_USERNAME" />
        </condition>
        <condition property="cre-password" value="${env.CRE_PASSWORD}" else="password">
            <isset property="env.CRE_PASSWORD" />
        </condition>
        <condition property="cre-dbname" value="${env.CRE_DBNAME}" else="dbname">
            <isset property="env.CRE_DBNAME" />
        </condition>

        <condition property="cre-port-http" value="${env.CRE_PORT_HTTP}" else="80">
            <isset property="env.CRE_PORT_HTTP" />
        </condition>
        <condition property="cre-port-https" value="${env.CRE_PORT_HTTPS}" else="443">
            <isset property="env.CRE_PORT_HTTPS" />
        </condition>


        <condition property="cre-upload-size" value="${env.CRE_UPLOAD_SIZE}" else="100M">
            <isset property="env.CRE_UPLOAD_SIZE" />
        </condition>
    </target>


    <target name="copyReplace" description="Copy template files and replace some strings">
         <copy file="proxy/nginx.conf.template" tofile="proxy/nginx.conf" overwrite="true" />
         <replace file="proxy/nginx.conf" token="example.com" value="${cre-domain}"/>

         <copy file="nextcloud/config/config.php.template" tofile="nextcloud/config/autoconfig.php" overwrite="true" />
         <replace file="nextcloud/config/autoconfig.php" token="example.com" value="${cre-domain}"/>
         <replace file="nextcloud/config/autoconfig.php" token="klingaman" value="${cre-username}"/>
         <replace file="nextcloud/config/autoconfig.php" token="pinatubo" value="${cre-password}"/>
         <replace file="nextcloud/config/autoconfig.php" token="sumatra" value="${cre-dbname}"/>

         <copy file="docker-compose.yml.template" tofile="docker-compose.yml" overwrite="true" />
         <replace file="docker-compose.yml" token="klingaman" value="${cre-username}"/>
         <replace file="docker-compose.yml" token="pinatubo" value="${cre-password}"/>
         <replace file="docker-compose.yml" token="sumatra" value="${cre-dbname}"/>
         <replace file="docker-compose.yml" token="80:80" value="${cre-port-http}:80"/>
		 <replace file="docker-compose.yml" token="443:443" value="${cre-port-https}:443"/>
    </target>

   <target name="start">
        <exec executable="docker-compose">
           <arg line="up -d" />
        </exec>
   </target>


   <target name="stop" description="Stops all containers">
         <exec executable="docker">
            <arg line="stop nginx2 php2 proxy2 postgres2 nextcloud2 nginx2nc" />
         </exec>
         <exec executable="docker">
            <arg line="rm nginx2 php2 proxy2 postgres2 nextcloud2 nginx2nc" />
         </exec>
   </target>


    <target name="kill" description="All data (inclusive database, etc) is removed">
         <delete dir="postgres/data" />
    </target>


{'fraction_non_alphanumeric': 0.1685880916858809, 'fraction_numerical': 0.0082734300827343, 'mean_word_length': 3.182643221781055, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 2, '>': 131, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '450425', 'n_tokens_mistral': 2261, 'n_tokens_neox': 2139, 'n_words': 416}