HomeDevCentral

Deploy static sites to /var/wwwroot

Description

Deploy static sites to /var/wwwroot

Summary:
Pillar

The web_domains contains groups.

The dictionary format allows to merge several pillar states in one, per
https://docs.saltstack.com/en/latest/topics/pillar/#pillar-dictionary-merging

The web_static_sites contains sites matching all the following conditions:

  1. The site is in a salt://wwwroot/<domain>/<subdomain>
  2. There is nothing to do to build the site (ie Git version = live version)
  3. Files can be owned by <domain user>:<web group>

Static sites

Static sites can be deployed:

  • through custom Salt states (see 2995a8f6)
  • just adding them to web_static_sites (see above)

Currently, the nginx configuration isn't handled by Salt,
only the file provisioning.

User accounts

A web group is created, each domain receives an account,
mainly to serve static content.

If an application runs, it should be as much as possible
isolated, to avoid to propagate security issues from one
application to another.

Sites deployed

  • www.nasqueron.org
  • ftp.nasqueron.org
  • docker.nasqueron.org
  • trustspace.nasqueron.org

Test Plan: State has been successfully applied on Ysul.

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D1082

Details

Provenance
derecksonAuthored on Oct 22 2017, 11:54
derecksonPushed on Oct 22 2017, 12:10
Reviewer
dereckson
Differential Revision
D1082: Deploy static sites to /var/wwwroot
Parents
rOPS4275a6f0c21c: Switch sphinx package to use Python 3
Branches
Unknown
Tags
Unknown