cookbook 'psgi', '= 0.0.5'
psgi (14) Versions 0.0.5 Follow1
Configures and runs psgi application
cookbook 'psgi', '= 0.0.5', :supermarket
knife supermarket install psgi
knife supermarket download psgi
Description
configures and runs psgi application as fastcgi server
Features
web servers supported
- FCGI (more coming soon)
web frameworks supported
Definitions
psgi_application
Definitions parameters
-
operator
(Catalyst|Dancer|Jifty), default valueCatalyst
-
application_user
, change to this username before starting the process -
application_home
, absolute path to directory holding application home -
enable_service
, whether to add service to run levels, defaulton
-
script
- absolute path to psgi script -
daemon_name
, optional, if not set evaluted as basename fromscript
-
daemon_path
- absolute path to daemon, optional, default value is path to system installed plackup -
socket
, optional -
environment
, default value{}
, hash containing environmental variables -
perl5lib
, default value[]
, array containing perl5lib paths -
nproc
, default value1
, number of child processes to launch -
proc_manager
, default valuenil
-
proc_title
, optional, how the processes are seen in process list -
mount
, default valuenil
-
config
, absolute path to application configuration file, optional for operator => 'Dancer' -
debug
, default value1
-
plackup_environment
, default valuedevelopment
-
cookbook
, default valuepsgi
, the name of cookbook where init script template coming from
Usage example
# run Catalyst Application (default flavour)
psgi_application 'my application' do
application_user 'user'
application_home '/home/user/app/MyApplication'
script '/home/user/app/MyApplication/scripts/foo.psgi'
config '/home/user/app/MyApplication/app.conf'
action 'install'
end
# run Dancer application
psgi_application 'my application' do
application_user 'user'
application_home '/home/user/app/MyApplication'
script '/home/user/app/MyApplication/scripts/foo.psgi'
operator 'Dancer'
action 'install'
end
# run Jifty application
psgi_application 'my application' do
application_user 'user'
application_home '/home/user/app/MyApplication'
script '/home/user/app/MyApplication/scripts/foo.psgi'
config '/home/user/app/MyApplication/app.conf'
operator 'Jifty'
action 'install'
end
# test application
psgi_application 'my application' do
application_user 'user'
application_group 'user'
application_home '/home/user/app/MyApplication'
script '/home/user/app/MyApplication/scripts/foo.psgi'
config '/home/user/app/MyApplication/app.conf'
action 'test'
end
# usage with non system plackup
psgi_application 'my application' do
application_user 'user'
application_home '/home/user/app/MyApplication'
script '/home/user/app/MyApplication/scripts/foo.psgi'
config '/home/user/app/MyApplication/app.conf'
action 'install'
daemon_path '/home/user/app/MyApplication/cpanlib/bin/plackup'
end
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.