Piper Push Cache Documentation Download Samples Contact  


Environment variables can be used to set some parameters. This option is useful when deploying Piper in a container.

An example of running Piper with environment variables is:

 > PIPER_CACHE_SIZE=1000 PIPER_VERBOSE=true PIPER_PAGE_DIR=~/pages NATS_URL=nats://localhost:4222 PIPER_NATS_SUBSCRIPTIONS="reply.> response.>" PIPER_NATS_DIRECT=true piper

The supported environment variables are:

PIPER_PAGE_DIR The directory to use for home.
PIPER_HTTP_PORT Sets the port to the provided value and give full access to all features on that port. For more control a configuration file should be used.
PIPER_VERBOSE Turns on logging for INFO level categories.
PIPER_DEBUG Turns on logging for all categories.
PIPER_CACHE_SIZE The maximum cache size for the default cache.
NATS_URL The URL to the NATS server.
PIPER_NATS_DIRECT When present as an environment variable the HTTP POST path that starts with /nats/ is a request to publish the contents of the POST on a subject that is the path of the URL after /nats/.
PIPER_NATS_SUBSCRIPTIONS A list of NATS subjects separated by a space that piper should subscribe to. JSON received on these subject are given a timestamp ID for reference but it is not inserted into the JSON.