Add Phabricator example

Summary: Add phabricator example

Reviewers: davidopp

Reviewed By: davidopp

Subscribers: #kubernetes

Projects: #kubernetes

Differential Revision: http://107.178.210.6/D5
This commit is contained in:
Filip Grzadkowski
2015-03-10 16:22:52 +01:00
parent a4d871a100
commit 401babef29
11 changed files with 354 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<Directory /home/www-data/phabricator/webroot>
Require all granted
</Directory>
<VirtualHost *>
DocumentRoot /home/www-data/phabricator/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]
</VirtualHost>

View File

@@ -0,0 +1,26 @@
FROM ubuntu:14.04
# Install all the required packages.
RUN apt-get update
RUN apt-get -y install \
git apache2 dpkg-dev python-pygments \
php5 php5-mysql php5-gd php5-dev php5-curl php-apc php5-cli php5-json php5-xhprof
RUN a2enmod rewrite
RUN apt-get source php5
RUN (cd `ls -1F | grep '^php5-.*/$'`/ext/pcntl && phpize && ./configure && make && sudo make install)
# Load code source.
RUN mkdir /home/www-data
RUN cd /home/www-data && git clone https://github.com/phacility/libphutil.git
RUN cd /home/www-data && git clone https://github.com/phacility/arcanist.git
RUN cd /home/www-data && git clone https://github.com/phacility/phabricator.git
RUN chown -R www-data /home/www-data
RUN chgrp -R www-data /home/www-data
ADD 000-default.conf /etc/apache2/sites-available/000-default.conf
ADD run.sh /run.sh
RUN chmod a+x /*.sh
# Run Apache2.
EXPOSE 80
CMD ["/run.sh"]

View File

@@ -0,0 +1,14 @@
#!/bin/bash
echo "MySQL host IP ${MYSQL_SERVICE_IP} port ${MYSQL_SERVICE_PORT}."
/home/www-data/phabricator/bin/config set mysql.host $MYSQL_SERVICE_IP
/home/www-data/phabricator/bin/config set mysql.port $MYSQL_SERVICE_PORT
/home/www-data/phabricator/bin/config set mysql.pass $MYSQL_PASSWORD
echo "Running storage upgrade"
/home/www-data/phabricator/bin/storage --force upgrade || exit 1
source /etc/apache2/envvars
echo "Starting Apache2"
apache2 -D FOREGROUND