Skip to content

feat(nginx): add site Nginx configuration resource#53

Merged
fbarrento merged 2 commits into
mainfrom
feat/40-nginx
May 24, 2026
Merged

feat(nginx): add site Nginx configuration resource#53
fbarrento merged 2 commits into
mainfrom
feat/40-nginx

Conversation

@fbarrento
Copy link
Copy Markdown
Contributor

Parent

Part of #32 (SDK enhancements for IaC readiness).

Closes #40.

What this adds

Site-scoped Nginx configuration: $forge->server($id)->site($siteId)->nginxConfig().

  • nginxConfig()->get(): NginxConfigid + nullable content (null while regenerating)
  • nginxConfig()->update(UpdateNginxConfigData) — async (202, void); body sent under config

Verified live, then recorded

Recorded against the real site: read the config, then write the same content back so the site is unchanged. Confirmed live: PUT body key is config, update is async 202 empty body.

Security

  • NginxConfigFixture overwrites the content blob (real server names + /home/forge paths) with a neutral placeholder.
  • No org slug, server id, or real paths on disk.

Tests

Full gate green: pint, rector, phpstan, type-coverage, and pest --exactly=100 (100% coverage).

🤖 Generated with Claude Code

fbarrento and others added 2 commits May 24, 2026 22:37
Wire SiteResource::nginxConfig(), add a get->update round-trip test
recorded against the live site (writes the same config back, leaving the
site unchanged), plus an NginxConfigFixture that overwrites the config
content (server names + filesystem paths).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fbarrento fbarrento self-assigned this May 24, 2026
@fbarrento fbarrento merged commit 16e39d6 into main May 24, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(nginx): nginx config + server templates resource

1 participant