File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,11 @@ RUN php5enmod mcrypt
4343RUN  /usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php
4444RUN  /bin/mv composer.phar /usr/local/bin/composer
4545
46- #  Install Composer and Drush
46+ #  Install Composer and Drush 6.7
47+ RUN  /usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php
48+ RUN  /bin/mv composer.phar /usr/local/bin/composer
4749RUN  /usr/local/bin/composer self-update
48- RUN  /usr/local/bin/composer global require drush/drush:6.*
49- RUN  ln -s /root/.composer/vendor/drush/drush/drush /usr/local/bin/drush
50+ RUN  mkdir --parents /opt/drush-6.7 && cd /opt/drush-6.7 && composer init --require=drush/drush:6.* -n && /usr/local/bin/composer config bin-dir /usr/local/bin && /usr/local/bin/composer install
5051
5152#  Prepare directory
5253RUN  mkdir /var/www
Original file line number Diff line number Diff line change 5050
5151#  Checking if the cron is already set up
5252#  Cron job written according http://www.drush.org/en/master/cron/
53- CRON_JOB=" root  /usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COLUMNS=72 /usr/local/bin/drush --root=/var/www cron" 
54- CHECK=$( cat /etc/crontab  |  grep -o " $CRON_JOB " ) 
53+ CRON_JOB=" www-data  /usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin COLUMNS=72 /usr/local/bin/drush --root=/var/www cron" 
54+ CHECK=$( cat $ENV_CRON  |  grep -o " $CRON_JOB " ) 
5555
5656if  [[ -z  $CHECK  ]];  then 
57- 	echo  " $CRON_SCHEDULE  $CRON_JOB " >>  /etc/cron.d/drupal 
58- 	echo  " $( date " +%Y-%m-%d %H:%M:%S" ) /etc/crontab " >>  /var/log/supervisor/cron.log
57+ 	echo  " $CRON_SCHEDULE  $CRON_JOB " >>  $ENV_CRON 
58+ 	echo  " $( date " +%Y-%m-%d %H:%M:%S" ) $ENV_CRON " >>  /var/log/supervisor/cron.log
5959else 
6060	echo  " $( date " +%Y-%m-%d %H:%M:%S" ) " >>  /var/log/supervisor/cron.log
6161fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments