File System Deployment Handler
Handles the deployment of one or more Deployment Packages to a file system.
A file system is described by a local path on disk, such as:
/www/files
/data
/Users/joesmith/files
These paths, in turn, my describe mounts that are ephemeral or non-ephemeral (such as Amazon EBS mounted drives or shared network storage).
The contents of the Deployment Packages will be deployed sequentially to the target location. If any of the content within the Deployment Packages fails to copy, it will simply be skipped. Other content objects will be allowed to proceed unabated.
Configuration
{
"deploymentPath": "{deploymentPath}"
}
Where deploymentPath
is the root path on disk where things should be written.
Mappings
The File System Deployment handler respects the f:deployment-config
feature if applied to a node. This feature lets you configure a set of mappings
that determine how a node's JSON object and any binary attachments should be mapped down and written to disk.
The default mappings are:
[{
"type": "object-to-file",
"config": {
"filepath": "/{{dependency.id}}/{{dependency.typeId}}.json"
}
}, {
"type": "attachment-to-file",
"config": {
"attachmentId": "*",
"filepath": "/{{dependency.id}}/{{attachment.filename}}"
}
]
These default mappings make it so that your Node's JSON is written to disk along with any of its attachments.
Nodes are written to disk like this:
{deploymentPath}/{nodeId}/node.json
Node attachments are written as well, like this:
{deploymentPath}/{nodeId}/attachments/{attachmentId}.{ext}
Associations are written to disk like this:
{deploymentPath}/{associationId}/association.json
Association attachments are written as well, like this:
{deploymentPath}/{associationId}/attachments/{attachmentId}.{ext}
Example
{
"deploymentPath": "/www/files"
}