feat: ssg:coolify publish target (SSG → nginx image → Coolify deploy webhook) - #38
Merged
Merged
Conversation
Refactor: pull the parts publishBuildCoolifySsr shares out — assertCoolifyPublishConfig(), stopLocalServing(), deployImageToCoolify() (docker tag/login/push + webhook POST), runInWorkDir(). New: publishBuildCoolifySsg — buildSsgOutput() then wrap dist/client in a minimal `nginx:alpine` image (COOLIFY_SSG_DOCKERFILE + nginx.conf: .html fallback, immutable cache on /_assets & /assets) + a .dockerignore so the build context stays small. Same push + deploy-webhook flow as SSR. buildDockerImage() now clears a stale .dockerignore left by a previous ssg:coolify publish. state.json gains `renderMode` for coolify sites. RENDER_HOSTS wires ssg:coolify; /capabilities + availableTargets gate it on REGISTRY_URL. webstudio-self-host#24. Fork needs no change (renderMode "ssg" + host "coolify" un-greys via capabilities.targets; the webhook field already shows for any host: "coolify"). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017rF3HMB1Z7V3LLsYaUrELs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes webstudio-self-host#24. Follows on from
ssr:coolify(#37). One commit.Refactor
publishBuildCoolifySsrshared parts pulled out:assertCoolifyPublishConfig()— the REGISTRY_URL / webhook / SSRF checksstopLocalServing()— tear down the local container / CF route / Traefik //var/publishdeployImageToCoolify()—docker tag :<buildId>+docker login(token via env) +docker push :latest :<buildId>+POSTthe webhookrunInWorkDir()— the per-workdir exec helperssg:coolifypublishBuildCoolifySsg:buildSsgOutput()(same prerender asssg:local), then wrapdist/clientin a tinynginx:alpineimage —COOLIFY_SSG_DOCKERFILE+ annginx.conf(.htmlfallback, immutable cache on/_assets&/assets) + a.dockerignore(*,!dist,!nginx.conf) so the context isn't the whole SSG toolchain. Then the same push + deploy-webhook flow as SSR.buildDockerImage()now removes a stale.dockerignorefirst (an ssg:coolify → ssr publish needs the fullCOPY . /app/).state.jsonfor coolify sites gainsrenderMode.RENDER_HOSTS["ssg:coolify"],/capabilities+availableTargetsgatessg:coolifyonREGISTRY_URL.Not here
renderMode: "ssg"+host: "coolify"un-greys viacapabilities.targets; the webhook field already renders for anyhost: "coolify".80instead of3000for SSG) — a one-line tweak, folded into a follow-up if wanted.Test
node --check+ smoke tests. E2e (build nginx image → push → webhook) on the Coolify bench alongside the ssr:coolify e2e.🤖 Generated with Claude Code
https://claude.ai/code/session_017rF3HMB1Z7V3LLsYaUrELs