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