Skip to content
My utility script to run plack scripts
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README
run

README

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
Something went wrong with that request. Please try again.