add heroku Procfile

dd Procfile
This commit is contained in:
Greg Weber 2011-07-15 07:25:56 -07:00
parent 4d7519d2be
commit 040893a0d4
3 changed files with 52 additions and 0 deletions

View File

@ -100,6 +100,9 @@ scaffold = do
mkDir "static/js"
mkDir "config"
mkDir "Model"
mkDir "deploy"
writeFile' ("deploy/Procfile") $(codegen "deploy/Procfile")
case backendS of
"s" -> writeFile' ("config/" ++ backendLower ++ ".yml") $(codegen ("config/sqlite.yml"))

View File

@ -0,0 +1,47 @@
# Simple and free deployment to Heroku.
#
# !! Warning: You must use a 64 bit machine to compile !!
#
# This could mean using a virtual machine. Give your VM as much memory as you can to speed up linking.
#
# Yesod setup:
#
# * Move this file out of the deploy directory and into your root directory
#
# mv deploy/Procfile ./
#
# * Create an empty Gemfile and Gemfile.lock
#
# touch Gemfile && touch Gemfile.lock
#
# * TODO: code to read DATABASE_URL environment variable.
#
# import System.Environment
# main = do
# durl <- getEnv "DATABASE_URL"
# # parse env variable
# # pass settings to withConnectionPool instead of directly using loadConnStr
#
# Heroku setup:
# Find the Heroku guide. Roughly:
#
# * sign up for a heroku account and register your ssh key
# * create a new application on the *cedar* stack
#
# * make your Yesod project the git repository for that application
# * create a deploy branch
#
# git checkout -b deploy
#
# Repeat these steps to deploy:
# * add your web executable binary (referenced below) to the git repository
#
# git add ./dist/build/~project~/~project~
#
# * push to Heroku
#
# git push heroku deploy:master
# Heroku configuration that runs your app
web: ./dist/build/~project~/~project~ -p $PORT

View File

@ -16,6 +16,7 @@ build-type: Simple
homepage: http://www.yesodweb.com/
extra-source-files:
input/*.cg
scaffold/cassius/default-layout.cassius.cg,
scaffold/cassius/homepage.cassius.cg,
scaffold/Model.hs.cg scaffold/sitearg.hs.cg,
@ -31,6 +32,7 @@ extra-source-files:
scaffold/pconn1.cg,
scaffold/.ghci.cg,
scaffold/cabal.cg,
scaffold/deploy/Procfile.cg,
scaffold/Controller.hs.cg,
scaffold/julius/homepage.julius.cg,
scaffold/hamlet/homepage.hamlet.cg,