# sites.conf.sample — anonymized template. Copy to sites.conf and fill in # real values; sites.conf itself should not be committed with production # hostnames/paths if this repo's policy treats that as sensitive — check # before adding it to version control. # # One hashref per site in the 'sites' arrayref. Fields: # name - identifier passed to --site on the command line. # from - local export directory (rsync source). MUST end with # '/', or rsync copies the directory itself rather than # its contents and --delete removes the real site to # make room for it. # to - remote docroot (rsync destination), relative to # sshHost. Also read LOCALLY by this script for the # pre-deploy backup, since the build and public trees # share the same /var/www NFS export. # user - site user to chown the deployed files to, remotely. # group - group to chown the deployed files to, remotely. # sshHost - remote host to rsync/ssh to. # exclude - paths under 'from' that rsync must never touch or # delete. 'fpc/' is not optional if this site has any # form snippets — omitting it lets a deploy delete a # live form's signed snippet directory. # formPages - OPTIONAL. Paths under 'from' (the exported page for # each form) that must contain the SSI include after # export. Omit entirely for a site with no formbridge # form yet -- the check is skipped, not failed. # formbridgeSiteId - OPTIONAL. The site_id this site is configured under # in formbridge's own etc/forms.d/*.json. Required # (alongside formPages) to run the post-deploy # --check-export audit; also doubles as a drift guard, # since --check-export hard-fails if 'to' does not # match that site_id's configured site_root. # backupRetention - OPTIONAL. How many pre-deploy backups to keep for # this site. Defaults to 7 (roughly a week of daily # deploys) if omitted. # formFields - OPTIONAL. Presence turns on the §10.9 deploy-time # form rewriter for this site: the designer builds # the form in a WordPress plugin (keeping the site's # styling) instead of a Custom HTML block, and this # converts the exported markup into something # formbridge accepts. A hashref, plugin input name => # formbridge field name. Omit entirely for the # Custom HTML block route (§10.5 route 1) -- a site # with no formFields is checked exactly as it always # was, with no rewriting. # formbridgeFormId - REQUIRED if formFields is set. Which form (under # formbridgeSiteId) to fetch the authoritative field # list from via --emit-field-map. Assumes one # formbridge form per site. # honeypotSource - REQUIRED if formFields is set. The plugin's own # honeypot input name -- separate from formFields # because the honeypot is deliberately excluded from # formbridge's declared field list, so it can never # appear in that mapping. return { sites => [ { name => 'example', from => '/var/www/example.com/static/', to => '/var/www/clients/client99/web999/web/', user => 'web999', group => 'client99', sshHost => 'public-server', exclude => [ 'robots.txt', 'stats/', 'error/', 'fpc/' ], formPages => [ 'contact/index.html' ], formbridgeSiteId => 'example.com', backupRetention => 7, # Only needed for the WordPress-form-plugin route (§10.9). Delete # these four lines entirely for the plain Custom HTML block route. formbridgeFormId => 'contact', honeypotSource => 'wpforms[hp]', formFields => { 'wpforms[fields][1][first]' => 'name_first', 'wpforms[fields][1][last]' => 'name_last', 'wpforms[fields][2]' => 'email', 'wpforms[fields][3]' => 'subject', 'wpforms[fields][4]' => 'message', }, }, ], };