Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 95 lines (84 sloc) 3.061 kb
051c3eb2 »
2010-02-28 add README to please github
1 NAME
2 daemontools-plack-runner - Shell Script To Bootstrap Plack Apps From Daemontools
3
4 DESCRIPTION
5 Generic run file to execute plack with daemontools
6
7 ASSUMPTIONS
8 * ALL perl dependencies are available via a local::lib
9 directory (default extlib)
10 * Requires daemontools (duh)
11 * Requires Plack (duh)
12 * Requires local::lib
13 In many cases, local::lib MUST BE INSTALLED GLOBALLY,
14 NOT your ~/perl5. If in doubt, install globally.
15 Otherwise, use PERL5LIB in your env dir
16 * Requires Server::Starter (start_server script)
17
18 USAGE SCENARIO
19 How /I/ use this with daemontools:
20 (1) mkdir /var/lib/svscan/myapp
21 (2) copy/symlink this file to /var/lib/svscan/myapp
22 (3) create /var/lib/svscan/myapp/catalyst.yaml
23 (4) mkdir /var/lib/svscan/myapp/env
24 (5) this env dir should contain files that have your settings.
25 for example, if you want to use hoge.psgi as your PSGI app,
26 create a file named PSGI_APP with "hoge.psgi" as its content.
27 (6) ln -s /var/lib/svscan/myapp /etc/service (or /service)
28
29 How /I/ use this in a Standalone deployment (for testing)
30 (1) create a directory like myapp/deploy (doesn't really matter)
31 (2) copy/symlink this file to /var/lib/svscan/myapp
32 (3) mkdir /var/lib/svscan/myapp/env
33 (4) create env files like (5) above
34 (5) ./deploy/run woot!
35
36 OFTEN USED VARIABLES:
37
38 APP_HOME
39 Location of your application files, directories, whatever.
40 Default: current directory
41 APP_USER
42 Username to run the application as
43 Default: www
44 CATALYST_CONFIG
45 Location of your Catalyst config file. You can ignore it
46 if you're not running Catalyst
47 Default: catalyst.yaml
48 CATALYST_HOME
49 Location of your Catalyst files. You can usually ignore it.
50 Default: $APP_HOME
51 EXTLIB
52 Location of your local::lib directory.
53 Default: $APP_HOME/extlib
abbf6004 »
2010-03-09 typo
54 EXTRA_ARGS
9473e60c »
2010-03-09 Add EXTRA_ARGS (thanks for dragon3)
55 Anything else you want to pass to plackup. For example, if you're
56 using Starman, you may want to specify --max-requests and --workers
051c3eb2 »
2010-02-28 add README to please github
57 PERL
58 Location of your Perl binary.
59 Default: Result of `type -p perl`
60 PLACK_HANDLER
61 The name of Plack handler to use.
62 Default: Starman
63 PLACKUP_SCRIPT
64 Location of your plackup script
65 Default: $EXTLIB/bin/plackup
66 PORT
67 Port to listen to
68 Default: 5000
69 PSGI_FILE
70 Location of your PSGI app file.
71 Default: app.psgi
72 START_SERVER_SCRIPT
73 Location of your start_server script
74 Default: $EXTLIB/bin/start_server
75
76 OTHER VARIABLES
77 Variables that this file does NOT directly use, but are usually
78 helpful when I'm debugging:
79
80 DEBUG
81 A lot of things acknowledge this ;)
82 DBI_TRACE / DBIC_TRACE
83 Enables tracing for DBI/DBIC
84
85 COPYRIGHT
86 Copyright (c) 2010 Daisuke Maki
87
88 LICENSE
89 This program is free software; you can redistribut it and/or modify it
90 under Artistic License 2.0
91 http://www.perlfoundation.org/artistic_license_2_0
92
93 AUTHORS
94 Original run file by Daisuke Maki
95 envdir fixes and polishing by Hirose Masaaki
Something went wrong with that request. Please try again.