Skip to content

Commit

Permalink
added Composer and Doctrine install commands
Browse files Browse the repository at this point in the history
also updated the MaxClients and ServerLimit in httpd.conf and commented
out the DocumentRoot so our vhost.conf file from the app repo can take
the lead on that
  • Loading branch information
daviddripps committed Feb 22, 2013
1 parent 59f512e commit 8085ed6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
29 changes: 28 additions & 1 deletion bin/compile
Expand Up @@ -46,9 +46,36 @@ cp $LP_DIR/conf/php.ini php
mkdir -p bin
ln -s /app/php/bin/php bin/php

# check if we have Composer dependencies and vendors are not bundled
if [ -f www/composer.json ] && [ ! -d www/vendor ]; then
GIT_DIR_ORIG=$GIT_DIR
unset GIT_DIR
echo "-----> Installing Composer dependencies"
COMPOSER_URL="http://getcomposer.org/composer.phar"
curl --silent --max-time 60 --location "$COMPOSER_URL" > www/composer.phar
cd www
LD_LIBRARY_PATH=$BUILD_DIR/php/ext $BUILD_DIR/php/bin/php -c $LP_DIR/conf/php.ini composer.phar install --prefer-source
cd $BUILD_DIR
rm www/composer.phar
export GIT_DIR=$GIT_DIR_ORIG
fi

if [ -f www/bin/doctrine.php ]; then
echo "-----> Updating Doctrine Schema"
LD_LIBRARY_PATH=$BUILD_DIR/php/ext $BUILD_DIR/php/bin/php -c $LP_DIR/conf/php.ini www/bin/doctrine.php orm:schema-tool:update --force
fi

#
# Note: this isn't used if the Heroku Procfile specifies a different path to boot.sh
#

cat >>boot.sh <<EOF
# add our own Document Root and Environment Settings
echo "Include /app/www/server/vhost.conf" >> $APACHE_PATH/conf/httpd.conf
# the boilerplate Heroku boot.sh stuff
for var in \`env|cut -f1 -d=\`; do
echo "PassEnv \$var" >> /app/apache/conf/httpd.conf;
echo "PassEnv \$var" >> $APACHE_PATH/conf/httpd.conf;
done
touch /app/apache/logs/error_log
touch /app/apache/logs/access_log
Expand Down
8 changes: 5 additions & 3 deletions conf/httpd.conf
Expand Up @@ -39,8 +39,8 @@ ServerRoot "/app/apache/"
#Listen 12.34.56.78:80
Listen ${PORT}

ServerLimit 1
MaxClients 1
ServerLimit 8
MaxClients 8
ListenBackLog 1024

#
Expand Down Expand Up @@ -106,7 +106,9 @@ ServerName 127.0.0.1
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/app/www"
# David: comment this out so it can be overwritten by our vhost.conf in the app repo
#
# DocumentRoot "/app/www"

#
# Each directory to which Apache has access can be configured with respect
Expand Down

0 comments on commit 8085ed6

Please sign in to comment.