Hi Zak,
Like you, I also tried to use a run shell script when deploying my Pyramid aplication locally on my own server (not Heroku). Maybe I can shed some light on the run script.
The run script is just a shell script (in my case a BASH script) to run your pyramid app. I also use Gunicorn. In my project root directory I had a config.py file to store the gunicorn initialization variables. It's something like:
import multiprocessing
workers = multiprocessing.cpu_count() * 2 +1
timeout = 60
daemon = True
pidfile = "/srv/web/run/test/test.pid"
errorlog = "/srv/web/log/test/test.log"
Then in my run script I have:
#!/bin/bash
gunicorn_paster --config=<path_to_config.py_file> /srv/web/prod/test/production.ini
I'm pretty sure this will be similar when used under Heroku.
I hope this helps your use case.
Regards,
Mark Huang