view release on metacpan or search on metacpan
- doc: how to use Starman instead of default web server
- bin/dochazka-resetdb: do not run the test suite
- Document how to (re-)initialize the database
- create ext/ dir and move inside there extra (non-production related) files
(Theo Chatzimichos)
- run systemd service as dochazka user, use starman as webapp server
(Theo Chatzimichos)
- tests: make integration tests run again...
0.537 2016-09-11 21:19 CEST
- set owner of the db (Theo Chatzimichos)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Fetchware.pm view on Meta::CPAN
push @filename_listing, [$filename,
"$year$month{$month}$day$fields[1]"];
}
} else {
###BUGALERT### Add support for other http servers such as lighttpd, nginx,
#cherokee, starman?, AND use the Server: header to determine which algorithm to
#use.
die <<EOD;
App-Fetchware: run-time error. A hardcoded algorithm to parse HTML directory
listings has failed! Fetchware currently only supports parseing Apache HTML
directory listings. This is a huge limitation, but surprisingly pretty much
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Kit/Obj/FS.pm view on Meta::CPAN
# 'isa' => sub { die "'bindir' must be a directory" unless -d $_[1] },
'default' => sub {
# PSGI/Plack $0
# 1. starman worker -Ilib ⦠t/test.psgi
# 2. 500 error: Cannot find current script 'starman worker -Ilib ⦠t/test.psgi' at â¦/FindBin.pm line 166.
local $0 = $0;
if ( $0 =~ m/(\S+\.psgi)/ ) {
$0 = $1;
}
require FindBin;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/netdisco-web view on Meta::CPAN
my $uid = (stat($netdisco->stringify))[4] || 0;
my $gid = (stat($netdisco->stringify))[5] || 0;
# only drop privileges if we are root; otherwise we cannot setuid anyway
# and Daemon::Control / starman would emit a misleading
# "Operation not permitted" warning under e.g. OpenShift random UIDs.
my $can_drop_priv = ($> == 0);
my $log_dir = dir($home, 'logs');
my $log_file;
bin/netdisco-web view on Meta::CPAN
$ENV{DANCER_ENVDIR},
($foreground ? () : $log_dir),
]);
warn "config watcher: watching $ENV{DANCER_ENVDIR} for updates.\n";
# TODO: starman also supports TTIN,TTOU,INT,QUIT
local $SIG{HUP} = sub { signal_child('HUP', $child); };
local $SIG{TERM} = sub { signal_child('TERM', $child); exit(0); };
while (1) {
my @restart;
bin/netdisco-web view on Meta::CPAN
}
}
}
sub fork_and_start {
my ($daemon, @starman_args) = @_;
my $pid = fork;
die "Can't fork: $!" unless defined $pid;
if ($pid == 0) { # child
$daemon->redirect_filehandles;
exec( 'starman', @starman_args );
}
else {
return $pid;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Office/CMS.pm view on Meta::CPAN
=head2 Start testing
Try:
starman -l 127.0.0.1:5006 --workers 1 httpd/cgi-bin/office/cms.psgi &
Or, for good debug output:
plackup -l 127.0.0.1:5006 httpd/cgi-bin/office/cms.psgi &
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Perl extension App::Office::Contacts::Donations.
1.10 Wed May 19 11:11:00 2010
- Update comments re starman usage in donations.psgi.
- Update version numbers in Build.PL and Makefile.PL.
1.09 Tue Apr 20 9:16:00 2010
- Change SQLite attribute from unicode to sqlite_unicode.
- Change the default database driver from Postgres to SQLite,
view all matches for this distribution
view release on metacpan or search on metacpan
1.12 Fri Jun 25 11:15:00 2010
- Change all JSON::XS->new->encode(...) to JSON::XS->new->utf8->encode(...).
1.11 Wed May 19 11:11:00 2010
- Update comments re starman usage in donations.psgi.
- Chop mailing list stuff from support.
- Update version numbers in Build.PL and Makefile.PL.
1.10 Tue Apr 20 9:16:00 2010
- Change SQLite attribute from unicode to sqlite_unicode.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Office/Contacts.pm view on Meta::CPAN
A L<Plack> script, I<contacts.psgi>:
#!/usr/bin/env perl
#
# Run with:
# starman -l 127.0.0.1:5003 --workers 1 httpd/cgi-bin/office/contacts.psgi &
# or, for more debug output:
# plackup -l 127.0.0.1:5003 httpd/cgi-bin/office/contacts.psgi &
use strict;
use warnings;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Padadoy.pm view on Meta::CPAN
}
$self->{user} = $yaml->{user} || getlogin || getpwuid($<);
$self->{repository} = $yaml->{repository} || catdir($self->{base},'repository');
$self->{port} = $yaml->{port} || 6000;
$self->{pidfile} = $yaml->{pidfile} || catfile($self->{base},'starman.pid');
$self->{remote} = $yaml->{remote};
# config file
$self->{config} = $config;
lib/App/Padadoy.pm view on Meta::CPAN
sub restart {
my $self = shift;
my $pid = $self->_pid;
if ($pid) {
$self->msg("Gracefully restarting starman as deamon on port %d (pid in %s)",
$self->{port}, $self->{pidfile});
run('kill','-HUP',$pid);
} else {
$self->start;
}
lib/App/Padadoy.pm view on Meta::CPAN
map { catfile($logs,$_) } qw(error.log access.log) ) {
open (my $fh, '>>', $_);
close $fh;
}
$self->msg("Starting starman as deamon on port %d (pid in %s)",
$self->{port}, $self->{pidfile});
# TODO: refactor after release of carton 1.0
$ENV{PLACK_ENV} = 'production';
my @opt = (
'starman','--port' => $self->{port},
'-D','--pid' => $self->{pidfile},
'--error-log' => catfile($logs,'error.log'),
'--access-log' => catfile($logs,'access.log'),
);
run('carton','exec','-Ilib','--',@opt);
lib/App/Padadoy.pm view on Meta::CPAN
Start or gracefully restart the application if running.
=head2 start
Start starman webserver with carton.
=head2 stop
Stop starman webserver.
=head2 status
Show some status information.
view all matches for this distribution
view release on metacpan or search on metacpan
script/peri-htserve view on Meta::CPAN
Currently only Starman or Gepok is supported. Default is Gepok.
_
},
starman_host => {
schema => ['str' => {}],
summary => 'Will be passed to Starman',
},
starman_port => {
schema => ['int' => {}],
summary => 'Will be passed to Starman',
},
gepok_http_ports => {
schema => ['str' => {}],
script/peri-htserve view on Meta::CPAN
my @argv;
push @argv, "-s", $server;
my @root_urls; # for hint
if ($server eq 'Starman') {
for (qw/host port/) {
push @argv, "--$_", $args{"starman_$_"} if $args{"starman_$_"};
}
my $host = $args{starman_host} // 'localhost';
my $port = $args{starman_port} // 8080;
push @root_urls, "http://$host:$port/";
} else {
if (!$args{gepok_http_ports} &&
!$args{gepok_https_ports} &&
!$args{gepok_unix_sockets}) {
script/peri-htserve view on Meta::CPAN
["Starman","Gepok"]
Currently only Starman or Gepok is supported. Default is Gepok.
=item B<--starman-host>=I<s>
Will be passed to Starman.
=item B<--starman-port>=I<s>
Will be passed to Starman.
=item B<--use-json>=I<s>, B<-M>
script/peri-htserve view on Meta::CPAN
require (see --require)
riap_access_log_histories (see --riap-access-log-histories)
riap_access_log_path (see --riap-access-log-path)
riap_access_log_size (see --riap-access-log-size)
server (see --server)
starman_host (see --starman-host)
starman_port (see --starman-port)
use (see --use)
user (see --user)
=head1 ENVIRONMENT
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/TestData.pm view on Meta::CPAN
'perl-proc-fork',
'perl-proc-terminator',
'perl-readonly',
'perl-router-simple',
'perl-scalar-list-utils',
'perl-starman>=0.3014',
'perl-string-format',
'perl-term-ansicolor>=2.02',
'perl-throwable>=0.200005',
'perl-try-tiny',
'perl-uri',
t/lib/TestData.pm view on Meta::CPAN
'perl-proc-fork'
'perl-proc-terminator'
'perl-readonly'
'perl-router-simple'
'perl-scalar-list-utils'
'perl-starman>=0.3014'
'perl-string-format'
'perl-term-ansicolor>=2.02'
'perl-throwable>=0.200005'
'perl-try-tiny'
'perl-uri'
view all matches for this distribution
view release on metacpan or search on metacpan
arriba --listen :5443:ssl --ssl-cert cert.pem --ssl-key key.pem \
--enable-spdy
=head1 OPTIONS
Arriba recognizes most of the options supported by L<Starman> -- see L<starman>
for a list of those.
=over 4
=item --enable-spdy
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Beagle/Cmd/Command/web.pm view on Meta::CPAN
has 'command' => (
isa => 'Str',
is => 'rw',
traits => ['Getopt'],
documentation => "command to run, e.g. plackup, starman, twiggy, etc.",
);
no Any::Moose;
__PACKAGE__->meta->make_immutable;
lib/Beagle/Cmd/Command/web.pm view on Meta::CPAN
=head1 SYNOPSIS
$ beagle web
$ beagle web --port 8080
$ beagle web --command starman
$ beagle web --admin
=head1 DESCRIPTION
Besices options below, C<web> supports options of C<plackup> too, so you can
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Business/Cart/Generic.pm view on Meta::CPAN
=head2 Start testing
Try:
starman -l 127.0.0.1:5008 --workers 1 httpd/cgi-bin/office/cms.psgi &
Or, for good debug output:
plackup -l 127.0.0.1:5008 httpd/cgi-bin/office/cms.psgi &
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Application/Demo/Dispatch.pm view on Meta::CPAN
A Plack script:
#!/usr/bin/env perl
#
# Run with:
# starman -l 127.0.0.1:5021 --workers 1 httpd/cgi-bin/cgi/application/demo/dispatch/dispatch.psgi &
# or, for more debug output:
# plackup -l 127.0.0.1:5021 httpd/cgi-bin/cgi/application/demo/dispatch/dispatch.psgi &
use strict;
use warnings;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Snapp/Demo/Four.pm view on Meta::CPAN
=over 4
=item o Use L<Starman>
Start starman with: starman -l 127.0.0.1:5174 --workers 1 httpd/cgi-bin/cgi.snapp.four.psgi &
=item o Use L<Plack>
Start plackup with: plackup -l 127.0.0.1:5174 httpd/cgi-bin/cgi.snapp.four.psgi &
=back
Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5174/.
These commands are copied from comments within httpd/cgi-bin/cgi.snapp.four.psgi. The value 5174 is of course just a suggestion. All demos in this series use port 5171 and up.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Snapp/Demo/One.pm view on Meta::CPAN
=over 4
=item o Use L<Starman>
Start starman with: starman -l 127.0.0.1:5171 --workers 1 httpd/cgi-bin/cgi.snapp.one.psgi &
=item o Use L<Plack>
Start plackup with: plackup -l 127.0.0.1:5171 httpd/cgi-bin/cgi.snapp.one.psgi &
=back
Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5171/.
These commands are copied from comments within httpd/cgi-bin/cgi.snapp.one.psgi. The value 5171 is of course just a suggestion. All demos in this series use port 5171 and up.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Snapp/Demo/Three.pm view on Meta::CPAN
=over 4
=item o Use L<Starman>
Start starman with: starman -l 127.0.0.1:5173 --workers 1 httpd/cgi-bin/cgi.snapp.three.psgi &
=item o Use L<Plack>
Start plackup with: plackup -l 127.0.0.1:5173 httpd/cgi-bin/cgi.snapp.three.psgi &
=back
Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5173/.
These commands are copied from comments within httpd/cgi-bin/cgi.snapp.three.psgi. The value 5173 is of course just a suggestion. All demos in this series use port 5171 and up.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Snapp/Demo/Two.pm view on Meta::CPAN
=over 4
=item o Use L<Starman>
Start starman with: starman -l 127.0.0.1:5172 --workers 1 httpd/cgi-bin/cgi.snapp.two.psgi &
=item o Use L<Plack>
Start plackup with: plackup -l 127.0.0.1:5172 httpd/cgi-bin/cgi.snapp.two.psgi &
=back
Then, with either starman or plackup, direct your browser to hit 127.0.0.1:5172/.
These commands are copied from comments within httpd/cgi-bin/cgi.snapp.two.psgi. The value 5172 is of course just a suggestion. All demos in this series use port 5171 and up.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CGI/Snapp/Dispatch.pm view on Meta::CPAN
Here is a PSGI script in production on my development machine. I<Note the call to new()!>
#!/usr/bin/env perl
#
# Run with:
# starman -l 127.0.0.1:5020 --workers 1 httpd/cgi-bin/local/wines.psgi &
# or, for more debug output:
# plackup -l 127.0.0.1:5020 httpd/cgi-bin/local/wines.psgi &
use strict;
use warnings;
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"perlconsole", "perlconsole", "0.4", "1", "1"
"perlindex", "perlindex", "1.605", "1", "2"
"perlipq", "perlipq", "1.25", "0", "3"
"pmtools", "pmtools", "1.10", "0", "0"
"pperl", "PPerl", "0.25", "3", "7"
"starman", "Starman", "0.2010", "0", "0"
"twiggy", "Twiggy", "0.1010", "0", "0"
"w3c-linkchecker", "W3C-LinkChecker", "4.8", "2", "2"
"xacobeo", "Xacobeo", "0.13", "0", "1"
"ylastic-costagent", "App-Ylastic-CostAgent", "not-uploaded", "0", "0"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CPANPLUS/Dist/Debora/Package/Debian.pm view on Meta::CPAN
'rpm-build-perl' => 'libb-perlreq-perl',
'Sepia' => 'sepia',
'SMTP-Server' => 'libnet-smtp-server-perl',
'SOCKS' => 'libnet-socks-perl',
'Starlet' => 'starlet',
'Starman' => 'starman',
'Template-Toolkit' => 'libtemplate-perl',
'Template-DBI' => 'libtemplate-plugin-dbi-perl',
'Template-GD' => 'libtemplate-plugin-gd-perl',
'Template-XML' => 'libtemplate-plugin-xml-perl',
'TermReadKey' => 'libterm-readkey-perl',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carmel.pm view on Meta::CPAN
> git commit -m "add Plack and Starman"
# On a new setup, or another developer's machine
> git pull
> carmel install
> carmel exec starman -p 8080 myapp.psgi
# Add a new dependency
> echo "requires 'Try::Tiny';" >> cpanfile
> carmel install
> git commit -am 'Add Try::Tiny'
lib/Carmel.pm view on Meta::CPAN
regular perl5 library path in C<local>. Once the rollout is complete, you can
include the path just like a regular L<local::lib> directory.
# Production environment: Roll out to ./local
> carmel rollout
> perl -Ilocal/lib/perl5 local/bin/starman -p 8080 myapp.psgi
You can run C<carmel rollout>> in a CI system to create the C<local> directory
next to your application code for a linux package (e.g. deb package), or Docker
containers.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carton.pm view on Meta::CPAN
> git add cpanfile cpanfile.snapshot
> git commit -m "add Plack and Starman"
# Other developer's machine, or on a deployment box
> carton install
> carton exec starman -p 8080 myapp.psgi
# carton exec is optional
> perl -Ilocal/lib/perl5 local/bin/starman -p 8080 myapp.psgi
> PERL5LIB=/path/to/local/lib/perl5 /path/to/local/bin/starman -p 8080 myapp.psgi
=head1 AVAILABILITY
Carton only works with perl installation with the complete set of core
modules. If you use perl installed by a vendor package with modules
view all matches for this distribution
view release on metacpan or search on metacpan
created ./hello_world/htdocs
## èµ·å
ããã©ã«ãã§ã¯ plackup ã§èµ·åãã¾ãã<br />
ãªãã·ã§ã³ -m ã« production ã¨æå®ãããã¨ã§ starman ã§èµ·åãã¾ãã<br />
ãã®èµ·åã¹ã¯ãªããã¯èªç±ã«ç·¨éãã¦ä½¿ããããã¨ãæ³å®ãã¦ãã¾ãã
% cd hello_world/app
% ./script/start_searver.sh
view all matches for this distribution
view release on metacpan or search on metacpan
t/app/Plack/Loader/Delayed.t view on Meta::CPAN
management with copy-on-write, however the application C<myapp.psgi>
is loaded per children.
L<Starman> since version 0.2000 loads this loader by default unless
you specify the command line option C<--preload-app> for the
L<starman> executable.
=head1 DEVELOPERS
Web server developers can make use of C<psgi_app_builder> attribute
callback set in Plack::Handler, to load the application earlier than
view all matches for this distribution
view release on metacpan or search on metacpan
t/07-params.t view on Meta::CPAN
use Config::Environment;
my $params = {
http => [
{
type => 'starman',
host => '0.0.0.0',
port => 9000,
opts => {
startup_check => 1
}
t/07-params.t view on Meta::CPAN
ok $http, '$http is ok';
ok $http1, '$http1 is ok';
ok $http2, '$http2 is ok';
is $http1->param('type'), 'starman', 'http1.type is ok';
is $http1->param('host'), '0.0.0.0', 'http1.host is ok';
is $http1->param('port'), 9000, 'http1.port is ok';
is $http1->param('opts.startup_check'), 1, 'http1.startup_check is ok';
is_deeply $http1->param('opts') => { startup => { check => 1 } };
view all matches for this distribution
view release on metacpan or search on metacpan
examples/fatpacked.plackup view on Meta::CPAN
management with copy-on-write, however the application C<myapp.psgi>
is loaded per children.
L<Starman> since version 0.2000 loads this loader by default unless
you specify the command line option C<--preload-app> for the
L<starman> executable.
=head1 DEVELOPERS
Web server developers can make use of C<psgi_app_builder> attribute
callback set in Plack::Handler, to load the application earlier than
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/AssertIndex.pm view on Meta::CPAN
use DBIx::AssertIndex;
my $row = $dbh->selectrow_hashref(q{SELECT * FROM some_table WHERE no_indexed_column = 'foo'});
or
> starman -MDBIx::AssertIndex app.psgi
=head1 DESCRIPTION
DBIx::AssertIndex is run explain with SELECT SQL and detect query without any index.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer/Deployment.pod view on Meta::CPAN
# change path_info to check and value of the Host header sent to application server
option httpchk HEAD / HTTP/1.1\r\nHost:\ app.example.com
server app1 app-be1.example.com:3000 check inter 30s
server app2 app-be2.example.com:3000 check inter 30s
We will need to start the workers on each backend of our application. This can be done by starman utility:
# on app-be1.example.com
$ starman --workers=2 --listen :3000 /path/to/app.pl
# on app-be2.example.com
$ starman --workers=2 --listen :3000 /path/to/app.pl
Then start the haproxy itself:
# check the configuration..
$ sudo haproxy -c -f haproxy.conf
view all matches for this distribution