Distributed Velocity Files - Documentation topics on: configuration,velocity,.

This documentation is a static copy for this version. For current documentation, see: http://dotcms.com/docs/latest

Distributed Velocity Files

The following documentation specifies how to externalize the location to which Velocity files (.vtl), are stored and allow the path to be set outside the default /WEB-INF/velocity directory from the dotCMS root. This way all Velocity files can be externalized from the WAR deployment entirely.

The only required action for customers is to set a new property inside the dotmarketing-config-ext.properties file (and then deploy plugins). This new property needs to be defined as VELOCITY_ROOT. It will specify the path of the Velocity folder (e.g. VELOCITY_ROOT = /usr/deploy/velocity).

This folder will be created on startup and, the following subdirectories will be generated within the customized path as live/working/archived versions of files are stored. For example, if VELOCITY_ROOT = /usr/deploy/velocity then the following folder structure would be created inside /user/deploy directory:

  • /velocity (as defined by VELOCITY_ROOT property)
    • /live
    • /working
    • /archived

The property can be also set by using an environmental variable (e.g.: VELOCITY_ROOT={env:velocityPath})

If for some reason, the specified location/path is unable to be created (permissions/unreadable or invalid path), the Velocity base path will be defaulted to WEB-INF/velocity (from the root of the installation).