SG Static Site Hosting
SG Static Site Hosting
Section titled “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>Deployment flow
Section titled “Deployment flow”- Copy curated source to
/opt/<project>/repo. - Install dependencies and build static output.
- Copy build output into a timestamped release directory.
- Atomically update the
currentsymlink. - Run
nginx -t. - Reload Nginx.
- Verify HTTP, HTTPS, sitemap, and expected pages.
- Add or update monitoring.
Rollback
Section titled “Rollback”Rollback is a symlink operation: point current back to a previous release, run nginx -t, reload Nginx, and verify.