The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
=head1 NAME

App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment

=head1 Relocating the Installation

The installation process installs Netdisco self-contained to your home
directory. The target directory can easily be changed by setting the
C<NETDISCO_HOME> environment variable, for example:

 export NETDISCO_HOME=/opt/netdisco

Obviously, you'll need to substitute this wherever you see "C<~>" in the
installation instructions. The Netdisco application will use this setting
itself to locate files and configuration.

=head1 Non-root Hosting

Netdisco will assume its web site is hosted at the apex of your server - that
is, the document root. To relocate the web application, pass the C<--path>
parameter to the web startup script:

 ~/bin/netdisco-web --path /netdisco2

=head1 Behind a Proxy

By default the web application daemon starts listening on port 5000 and goes 
into the background. This is ideal for hosting behind a web proxy (e.g. Apache
with C<mod_proxy>).

After enabling the C<proxy> and C<proxy_http> modules in Apache, a suitable
configuration would be:

 ProxyPass / http://localhost:5000/
 ProxyPassReverse / http://localhost:5000/
 
 <Proxy *>
   Order allow,deny
   Allow from all
 </Proxy>

To combine this with Non-root Hosting as above, simply change the paths
referenced in the configuration like so (and use C<--path> option):

 ProxyPass /netdisco2 http://localhost:5000/
 ProxyPassReverse /netdisco2 http://localhost:5000/

=head1 SQL and HTTP Trace

For SQL debugging try the following commands:

 DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/localenv starman --workers=1 ~/bin/netdisco-web-fg
 DBIC_TRACE_PROFILE=console DBIC_TRACE=1 ~/bin/localenv ~/bin/netdisco-daemon-fg

=head1 Further Reading...

Other ways to run and host the web application can be found in the
L<Dancer::Deployment> page. See also the L<plackup> and L<starman>
documentation.

=cut