Ubic-Service-ServerStarter

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

# NAME

Ubic::Service::ServerStarter - Run programs using Server::Starter

# VERSION

version 0.003

# SYNOPSIS

    use Ubic::Service::ServerStarter;
    return Ubic::Service::ServerStarter->new({
        cmd => [
            'starman',
            '--preload-app',
            '--env' => 'development',
            '--workers' => 5,
        ],
        args => {
            interval => 5,
            port => 5003,
            signal-on-hup => 'QUIT',
            signal-on-term => 'QUIT',
        },
        ubic_log => '/var/log/app/ubic.log',
        stdout   => '/var/log/app/stdout.log',
        stderr   => '/var/log/app/stderr.log',
        user     => "www-data",
    });

# DESCRIPTION

This service allows you to wrap any command with [Server::Starter](https://metacpan.org/pod/Server::Starter), which
enables graceful reloading of that app without any downtime.

# NAME

Ubic::Service::ServerStarter - ubic service class for running commands
with [Server::Starter](https://metacpan.org/pod/Server::Starter)

# METHODS

- _args_ (optional)

    Arguments to send to `start_server`.

- _cmd_ (required)

    ArrayRef of command + options to run with server starter.  Everything passed
    here will go be put after the `--` in the `start_server` command:

        start_server [ args ] -- [ cmd ]

    This argument is required becasue we have to have something to run!

- _status_

    Coderef to special function, that will check status of your application.

- _ubic\_log_

    Path to ubic log.

- _stdout_

    Path to stdout log.

- _stderr_

    Path to stderr log.

- _proxy\_logs_

    Boolean flag. If enabled, `ubic-guardian` will replace daemon's stdout and



( run in 0.441 second using v1.01-cache-2.11-cpan-e93a5daba3e )