Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to make a Dockerfile for orangescrum #149

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3647bed
Updated readme.md to cause travis ci to trigger a build
adityai May 17, 2016
176af3a
Initial commit of Dockerfile for PHP container
adityai May 17, 2016
6021786
Initial commit circle.yml
adityai May 18, 2016
750f9bc
random edit to trigger a build
adityai May 18, 2016
52b233d
Replaced RUN with CMD
adityai May 18, 2016
c3fca77
clone from orangescrum/orangescrum
adityai May 18, 2016
766de2a
Copying Dockerfile content from another pull on orangescrum/orangescrum
adityai May 18, 2016
4c58140
Switching git clone back to adityai/orangescrum
adityai May 18, 2016
6eedbec
Uncommented install relevant packages
adityai May 18, 2016
403967a
Added apt-get update
adityai May 18, 2016
939ce94
Starting over with fewer steps in Dockerfile
adityai May 18, 2016
d846225
Install pear and phing
adityai May 18, 2016
37a1876
Removed apt-get and added machine section
adityai May 18, 2016
db9d4a4
Install cakephp/Phing_d51PearPkg2Task
adityai May 18, 2016
bbdd237
Added pear channel-discover pear.cakephp.org
adityai May 18, 2016
79f796b
Added pear.cakephp.org/Phing_d51PearPkg2Task-0.6.5
adityai May 18, 2016
817ac45
Trying channel://pear.cakephp.org/Phing_d51PearPkg2Task-0.6.5
adityai May 18, 2016
37c90be
Trying pear install cakephp/Phing_d51PearPkg2Task-0.6.5
adityai May 18, 2016
b7cce92
Installing with --alldeps
adityai May 18, 2016
05ff7da
Trying without 0.6.5
adityai May 18, 2016
d4fa8b1
Changed to alpha version
adityai May 19, 2016
3137690
Updated travis yml to use php 5.5.11
adityai May 19, 2016
07c52f9
Install php apache using travis yml
adityai May 19, 2016
4723f71
Updated php version to 5.5
adityai May 19, 2016
a87ce0f
Updated travis yml to install npm, node and pear
adityai May 19, 2016
c8cfad5
Update travis yml to use apt to install pear
adityai May 19, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -108,4 +110,4 @@ script:
- ./lib/Cake/Console/cake test core AllTests --stderr

notifications:
email: false
email: false
60 changes: 60 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM php:5.5

MAINTAINER [email protected]
# 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

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)




17 changes: 17 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -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