Skip to content

Commit

Permalink
add some real instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
pearkes committed Jun 3, 2012
1 parent 2e536e1 commit 4e5c5c9
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
Apache+PHP build pack
Static build pack
========================

This is a build pack bundling PHP and Apache for Heroku apps.
This is a build pack bundling Apache for the serving of static files from Heroku.

Use
-------

$ ls
index.html somedir/
$ git init
$ heroku create --stack cedar --buildpack https://github.com/pearkes/heroku-buildpack-static
$ git add .
$ git commit -m "initial commit"
$ git push heroku master

Configuration
-------------

The config files are bundled with the LP itself:

* conf/httpd.conf
* conf/php.ini


Pre-compiling binaries
Expand All @@ -24,30 +34,30 @@ Pre-compiling binaries
make
make install
cd ..

# php
wget http://us2.php.net/get/php-5.3.6.tar.gz/from/us.php.net/mirror
wget http://us2.php.net/get/php-5.3.6.tar.gz/from/us.php.net/mirror
mv mirror php.tar.gz
tar xzvf php.tar.gz
cd php-5.3.6/
./configure --prefix=/app/php --with-apxs2=/app/apache/bin/apxs --with-mysql --with-pdo-mysql --with-pgsql --with-pdo-pgsql --with-iconv --with-gd --with-curl=/usr/lib --with-config-file-path=/app/php --enable-soap=shared --with-openssl
make
make install
cd ..

# php extensions
mkdir /app/php/ext
cp /usr/lib/libmysqlclient.so.15 /app/php/ext/

# pear
apt-get install php5-dev php-pear
pear config-set php_dir /app/php
pecl install apc
mkdir /app/php/include/php/ext/apc
cp /usr/lib/php5/20060613/apc.so /app/php/ext/
cp /usr/include/php5/ext/apc/apc_serializer.h /app/php/include/php/ext/apc/


# package
cd /app
echo '2.2.19' > apache/VERSION
Expand All @@ -61,9 +71,3 @@ Hacking

To change this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it.


Meta
----

Created by Pedro Belo.
Many thanks to Keith Rarick for the help with assorted Unix topics :)

0 comments on commit 4e5c5c9

Please sign in to comment.