App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment
The installation process installs Netdisco self-contained to your home directory. The target directory can easily be changed by setting the NETDISCO_HOME environment variable, for example:
NETDISCO_HOME
export NETDISCO_HOME=/opt/netdisco
Obviously, you'll need to substitute this wherever you see "~" in the installation instructions. The Netdisco application will use this setting itself to locate files and configuration.
~
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 --path parameter to the web startup script:
--path
~/bin/netdisco-web --path /netdisco2
Alternatively, can set the path configuration option in your deployment.yml file:
path
deployment.yml
path: '/netdisco2'
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 mod_proxy).
mod_proxy
After enabling the proxy and proxy_http modules in Apache, a suitable configuration would be:
proxy
proxy_http
ProxyPass / http://localhost:5000/ ProxyPassReverse / http://localhost:5000/ <Proxy *> Order allow,deny Allow from all </Proxy>
You also need to set the following configuration in your deployment.yml file:
behind_proxy: 1
To combine this with Non-root Hosting as above, simply change the paths referenced in the configuration like so (and use Non-root Hosting as above):
ProxyPass /netdisco2 http://localhost:5000/ ProxyPassReverse /netdisco2 http://localhost:5000/
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
Other ways to run and host the web application can be found in the Dancer::Deployment page. See also the plackup and starman documentation.
To install App::Netdisco, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Netdisco
CPAN shell
perl -MCPAN -e shell install App::Netdisco
For more information on module installation, please visit the detailed CPAN module installation guide.