Skip to content

Instantly share code, notes, and snippets.

@aarondfrancis
Last active December 16, 2015 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarondfrancis/5515245 to your computer and use it in GitHub Desktop.
Save aarondfrancis/5515245 to your computer and use it in GitHub Desktop.

web-boot.sh

for var in `env|cut -f1 -d=`; do
  echo "PassEnv $var" >> /app/apache/conf/httpd.conf;
done
touch /app/apache/logs/error_log
touch /app/apache/logs/access_log
touch /app/apache/logs/app_log
tail -F /app/apache/logs/error_log &
tail -F /app/apache/logs/access_log &
tail -F /app/apache/logs/app_log &
export LD_LIBRARY_PATH=/app/php/ext
export PHP_INI_SCAN_DIR=/app/www
echo "Launching apache"
bin/php www/protected/yiic.php migrate --interactive=0
exec /app/apache/bin/httpd -DNO_DETACH

index.php

$STDOUT = fopen("php://stdout", "w");
fwrite($STDOUT, "oh, hey there.");
fclose($STDOUT);

output

23:49:56.126591+00:00 heroku[web.1]: Starting process with command `sh www/web-boot.sh`
23:49:56.817940+00:00 app[web.1]: Launching apache
23:49:56.864745+00:00 app[web.1]: 
23:49:56.864745+00:00 app[web.1]: 
23:49:56.864745+00:00 app[web.1]: Yii Migration Tool v1.0 (based on Yii v1.1.13)
23:49:57.820352+00:00 app[web.1]: No new migration found. Your system is up-to-date.
23:49:57.980444+00:00 heroku[web.1]: State changed from starting to up
23:49:58.549708+00:00 heroku[web.1]: Stopping all processes with SIGTERM
23:49:58.849625+00:00 app[web.1]: [Fri May 03 23:49:57 2013] [notice] Apache/2.2.22 (Unix) PHP/5.3.10 configured -- resuming normal operations
23:49:59.858971+00:00 app[web.1]: [Fri May 03 23:49:58 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
23:50:00.694923+00:00 heroku[web.1]: Process exited with status 0
23:54:06.621635+00:00 heroku[router]: at=info method=GET path=/ host=getmantis-staging.herokuapp.com fwd="99.152.155.73" dyno=web.1 connect=10ms service=196ms status=200 bytes=8900
23:54:07.346054+00:00 app[web.1]: 10.149.0.95 - - [03/May/2013:23:54:06 +0000] "GET / HTTP/1.1" 200 8887
23:59:03.229728+00:00 app[web.1]: 10.70.255.223 - - [03/May/2013:23:59:02 +0000] "GET / HTTP/1.1" 200 8887
23:59:03.327304+00:00 heroku[router]: at=info method=GET path=/images/mantis.ico host=getmantis-staging.herokuapp.com fwd="99.152.155.73" dyno=web.1 connect=2ms service=7ms status=200 bytes=16958
23:59:04.239359+00:00 app[web.1]: 10.143.151.157 - - [03/May/2013:23:59:03 +0000] "GET /images/mantis.ico HTTP/1.1" 200 16958
23:59:02.795931+00:00 heroku[router]: at=info method=GET path=/ host=getmantis-staging.herokuapp.com fwd="99.152.155.73" dyno=web.1 connect=2ms service=167ms status=200 bytes=8900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment