Skip to content

SG Static Site Hosting

Static sites on digitalocean-sg use an atomic release layout.

/opt/<project>/repo
/var/www/<domain>/releases/<timestamp>
/var/www/<domain>/current -> releases/<timestamp>
/etc/nginx/sites-available/<domain>
/etc/nginx/sites-enabled/<domain>
  1. Copy curated source to /opt/<project>/repo.
  2. Install dependencies and build static output.
  3. Copy build output into a timestamped release directory.
  4. Atomically update the current symlink.
  5. Run nginx -t.
  6. Reload Nginx.
  7. Verify HTTP, HTTPS, sitemap, and expected pages.
  8. Add or update monitoring.

Rollback is a symlink operation: point current back to a previous release, run nginx -t, reload Nginx, and verify.