Skip to content

Commit e5ee993

Browse files
Merge pull request #6 from devsu/dev4
Dev4
2 parents 2f5593a + a7a3e91 commit e5ee993

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ RUN php5enmod mcrypt
4343
RUN /usr/bin/curl -sS https://getcomposer.org/installer | /usr/bin/php
4444
RUN /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
4749
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
5051

5152
# Prepare directory
5253
RUN mkdir /var/www

startup.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ fi
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

5656
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
5959
else
6060
echo "$(date "+%Y-%m-%d %H:%M:%S") CRON_JOB already created, doing nothing..." >> /var/log/supervisor/cron.log
6161
fi

0 commit comments

Comments
 (0)