File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,11 @@ RUN php5enmod mcrypt
43
43
RUN /usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php
44
44
RUN /bin/mv composer.phar /usr/local/bin/composer
45
45
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
47
49
RUN /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
50
51
51
52
# Prepare directory
52
53
RUN mkdir /var/www
Original file line number Diff line number Diff line change 50
50
51
51
# Checking if the cron is already set up
52
52
# 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 " )
55
55
56
56
if [[ -z $CHECK ]]; then
57
- echo " $CRON_SCHEDULE $CRON_JOB " >> /etc/cron.d/drupal
58
- echo " $( date " +%Y-%m-%d %H:%M:%S" ) CRON_JOB set in /etc/crontab " >> /var/log/supervisor/cron.log
57
+ echo " $CRON_SCHEDULE $CRON_JOB " >> $ENV_CRON
58
+ echo " $( date " +%Y-%m-%d %H:%M:%S" ) CRON_JOB set in $ENV_CRON " >> /var/log/supervisor/cron.log
59
59
else
60
60
echo " $( date " +%Y-%m-%d %H:%M:%S" ) CRON_JOB already created, doing nothing..." >> /var/log/supervisor/cron.log
61
61
fi
You can’t perform that action at this time.
0 commit comments