diff --git a/.travis.yml b/.travis.yml index 6f1f85c2..ac5a6fdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,16 @@ language: php php: - - 5.2 - - 5.3 - - 5.4 + - 5.5 env: - DB=mysql - DB=pgsql - DB=sqlite + +before_install: + - sudo apt-get -qq update + - sudo apt-get install -y apache2 php5-common libapache2-mod-php5 php5-cli npm nodejs php5-dev php-pear before_script: - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" @@ -108,4 +110,4 @@ script: - ./lib/Cake/Console/cake test core AllTests --stderr notifications: - email: false \ No newline at end of file + email: false diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f93232e3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,60 @@ +FROM php:5.5 + +MAINTAINER adityaii@gmail.com +# PHP Container for orangescrum + +# Clone orangescrum/orangescrum +CMD git clone https://github.com/adityai/orangescrum + +CMD cd $HOME && ls -ltr && echo "Work in progress." + +# apt-get update +RUN apt-get update + +# Install the relevant packages +RUN apt-get install libapache2-mod-php5 php5-cli php5-mysqlnd curl php5-curl php5-mcrypt cron -y + +# Enable the php mod we just installed +RUN a2enmod php5 + +# expose port 80 and 443 for the web requests +EXPOSE 80 +EXPOSE 443 + + +###### Update the php INI settings ######### + +# Increase php's max allowed memory size +RUN sed -i 's;memory_limit = .*;memory_limit = -1;' /etc/php5/apache2/php.ini +RUN sed -i 's;memory_limit = .*;memory_limit = -1;' /etc/php5/cli/php.ini + +RUN sed -i 's;display_errors = .*;display_errors = Off;' /etc/php5/apache2/php.ini + +# Change apache php to allow larger uploads/POSTs +RUN sed -i 's;post_max_size = .*;post_max_size = 4000M;' /etc/php5/apache2/php.ini +RUN sed -i 's;upload_max_filesize = .*;upload_max_filesize = 2000M;' /etc/php5/apache2/php.ini + +# Set the max execution time +RUN sed -i 's;max_execution_time = .*;max_execution_time = 300;' /etc/php5/apache2/php.ini +RUN sed -i 's;max_execution_time = .*;max_execution_time = 300;' /etc/php5/cli/php.ini + +# This is also needed for execution time +RUN sed -i 's;max_input_time = .*;max_input_time = 300;' /etc/php5/apache2/php.ini + + +####### END of updating php INI ######## +######################################## + +# Manually set the apache environment variables in order to get apache to work immediately. +ENV APACHE_RUN_USER www-data +ENV APACHE_RUN_GROUP www-data +ENV APACHE_LOG_DIR /var/log/apache2 + +# It appears that the new apache requires these env vars as well +ENV APACHE_LOCK_DIR /var/lock/apache2 +ENV APACHE_PID_FILE /var/run/apache2/apache2.pid + +# Set up url rewrite ability +RUN a2enmod rewrite +RUN php5enmod mcrypt + diff --git a/README.md b/README.md index 4404155c..963f14c2 100644 --- a/README.md +++ b/README.md @@ -39,4 +39,5 @@ * **Google Group**: [https://groups.google.com/group/orangescrum-community-support](https://groups.google.com/group/orangescrum-community-support) * **Youtube**: [https://www.youtube.com/watch?v=4qCaP0TZuxU](https://www.youtube.com/watch?v=4qCaP0TZuxU) - \ No newline at end of file + + diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..6a977ca1 --- /dev/null +++ b/circle.yml @@ -0,0 +1,17 @@ +machine: + php: + version: 5.5.11 + +## Customize dependencies +dependencies: + pre: + - pear channel-discover pear.phing.info + - pear channel-discover pear.cakephp.org + - pear install phing/phing + - pear install --alldeps cakephp/Phing_d51PearPkg2Task-alpha + +deployment: + dockerhub: + branch: master + commands: + - $DOCKER_HUB_TRIGGER