Skip to content
Newer
Older
100644 124 lines (80 sloc) 3.12 KB
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
1 =head1 dancerctl
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
2
3 dancerctl - Like apachectl for perl/Dancer apps.
4 Small tool that can start/stop/restart Dancer apps.
5
590053d @knutov Command line paramaters order changed
authored Nov 25, 2011
6 =head3 Usage
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
7
590053d @knutov Command line paramaters order changed
authored Nov 24, 2011
8 dancerctl action [appname [environment]]
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
9
1e0ddf9 @knutov fixes in documentation
authored Nov 25, 2011
10 Where C<action> can be
11
12 start, stop, restart
13 status
14 help
15 init
16 startall, stopall, restartall, statusall
17
18 C<environment> - usually 'development' or 'production' (by default).
19 Default environment is used if no C<environment> specified.
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
20
21 Examples under not root user:
22
590053d @knutov Command line paramaters order changed
authored Nov 24, 2011
23 dancerctl start|stop|restart|status app [environment]
adba838 @knutov fixes in readme
authored Nov 24, 2011
24 dancerctl startall|stopall|restartall|status|statusall
cd48d93 @knutov fixes in readme
authored Nov 24, 2011
25 dancerctl help
9d702b1 @knutov added init
authored Nov 25, 2011
26 dancerctl init appname path [force]
587c5ba @knutov small changes in readme
authored Nov 27, 2011
27
28 Examples under root(!) user: [not implemented now]
29
30 dancerctl user [action [app [environment]]]
31
32 Not implemented now, but will be in future
33
34 dancerctl setup [not implemented]
35 dancerctl update [not implemented]
36 dancerctl list [not implemented]
9d702b1 @knutov added init
authored Nov 25, 2011
37
38 =head3 dancerctl init
39
40 C<init> will create config for app with default recommended values.
deab3d1 @knutov dancer.conf -> dancerctl.conf
authored Nov 27, 2011
41 Default config can be placed in C<recommended:> section to F</etc/dancerctl.conf>
9ea9d73 @knutov small fixes
authored Nov 25, 2011
42 otherwise the C<__DATA__> section of F<dancerctl> script will be used.
9d702b1 @knutov added init
authored Nov 25, 2011
43
5530b4d @knutov fix in init documentation
authored Nov 25, 2011
44 dancerctl init appname path [force]
9d702b1 @knutov added init
authored Nov 25, 2011
45
46 =over
47
48 * path counted from user dir: app -> /home/user/app
49 * when 'force' the config file will be overwritten if exists.
50
51 =back
52
53 Examples:
54
55 # example 1:
6c60435 @knutov small changes in readme
authored Nov 27, 2011
56 dancerctl init app path/to/app
9d702b1 @knutov added init
authored Nov 25, 2011
57 # example 2:
58 cd path/to/app
59 dancerctl init app `pwd`
60 # example 3: config will be recreated
61 cd path/to/app
62 dancerctl init app `pwd` force
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
63
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
64 =head2 Configs (ORDER BY priority DESC)
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
65
3031b0a @knutov change default config filename .dancer -> .dancerctl
authored Nov 27, 2011
66 ~/.dancerctl/$appname [environment: section]
67 ~/.dancerctl/$appname [root param]
68 /etc/dancerctl.conf
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
69
3031b0a @knutov change default config filename .dancer -> .dancerctl
authored Nov 26, 2011
70 Config format: YAML for the F<~/.dancerctl/$appname> and any ini-style (better
deab3d1 @knutov dancer.conf -> dancerctl.conf
authored Nov 26, 2011
71 YAML too) for the F</etc/dancerctl.conf>
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
72
cd48d93 @knutov fixes in readme
authored Nov 24, 2011
73 =head3 Config example
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
74
3031b0a @knutov change default config filename .dancer -> .dancerctl
authored Nov 26, 2011
75 See F<app.yml> which should be moved to F</home/user/.dancerctl/> and renamed to F<app>.
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
76
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
77 =over
78
cd48d93 @knutov fixes in readme
authored Nov 24, 2011
79 * NOTE! Names of parameters in config can be changed in next versions
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
80
81 =back
82
83 =head3 Global %ENV params
84
85 It is possible to use to global parameters in %ENV:
86
deab3d1 @knutov dancer.conf -> dancerctl.conf
authored Nov 26, 2011
87 DANCERCTL_CONF - default config for dancerctl, instead of /etc/dancerctl.conf
88 DANCERCTL_DEBUG - enable/disable debug mode, has more priority, then in dancerctl.conf
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
89
90 Examples:
deab3d1 @knutov dancer.conf -> dancerctl.conf
authored Nov 26, 2011
91 export DANCERCTL_CONF=/path/to/local/dancerctl.conf
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
92 DANCERCTL_DEBUG=1 dancerctl statusall
93
94 =head2 Install
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
95
9d702b1 @knutov added init
authored Nov 25, 2011
96 perl 5.10, L<Config::Auto> and L<YAML::Tiny> are required.
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
97
f752321 @knutov added installation instructions
authored Nov 24, 2011
98 curl -L http://cpanmin.us -k | perl - --self-upgrade
9d702b1 @knutov added init
authored Nov 25, 2011
99 cpanm Config::Auto YAML::Tiny
f752321 @knutov added installation instructions
authored Nov 24, 2011
100
101 cd ~
102 mkdir dancerctl
103 cd dancerctl
104 git clone git://github.com/knutov/dancerctl.git ./
105 alias d='~/dancerctl/dancerctl'
106 d help
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
107
92d3f85 @knutov small fixes
authored Nov 24, 2011
108 C<dancerctl> was tested under modern version of Ubuntu (11.04).
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
109 Some parts (like 'status') may not work under different linuxes and OSes
1771d59 @knutov fixes in readme
authored Nov 24, 2011
110 (note hardcoded slashes and format of C<ps lax>).
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
111
6c60435 @knutov small changes in readme
authored Nov 27, 2011
112 You can get 'dev' branch with latest changes with
113
cf7fcd5 @knutov how to get dev branch
authored Nov 27, 2011
114 git clone git://github.com/knutov/dancerctl.git ./ -b dev
115
68c47e0 @knutov added plackup -r -R support
authored Nov 24, 2011
116 =head2 Copyright
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
117
92d3f85 @knutov small fixes
authored Nov 24, 2011
118 Copyright (c) 2011, Nick Knutov, nick@knutov.com, L<https://github.com/knutov/dancerctl>
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
119
6af93ca @knutov small fix
authored Nov 24, 2011
120 =head3 License
cb128f6 @knutov added readme in pod format
authored Nov 24, 2011
121
122 BSD 2-Clause License (L<http://en.wikipedia.org/wiki/BSD_licenses>)
123
124 =cut
Something went wrong with that request. Please try again.