Repository navigation
Conversation
…g on HTTP The image migration regenerated each site's docker-compose.yml with HTTPS on whenever site_ssl was set. A site waiting for `ee site ssl-verify` after a manual DNS-01 challenge has site_ssl=le but no certificate yet, so nginx-proxy then served it over HTTPS with the closest matching certificate of another site. Use site-command's is_le_ssl_pending() when it exists, the same check refresh and `update --php` use. Older site-command versions don't have it and keep the previous behaviour.
…se file's HTTPS state
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change preserves backward compatibility and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Keeps sites with pending Let's Encrypt certificates on HTTP when image migrations regenerate their Docker Compose configuration.
Changes:
- Uses the site-command pending-certificate helper to determine whether HTTPS should remain disabled.
- Preserves existing behavior when the helper is unavailable or the site has no SSL configured.
| File | Description |
|---|---|
php/EE/Migration/SiteContainers.php |
Adds a backward-compatible HTTPS decision helper for site Compose regeneration. |
Review effort: Balanced
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.
What
The image migration regenerates each affected site's
docker-compose.ymlinSiteContainers::generate_site_docker_compose_file()and decided HTTPS only fromsite_ssl. It now also keeps a site on plain HTTP while its Let's Encrypt certificate is pending.Why
EasyEngine/site-command#521 adds a pending Let's Encrypt state: after a manual DNS-01 challenge (no Cloudflare API key) the site keeps
site_ssl = lebut has no certificate untilee site ssl-verifyissues it, and the site is served over HTTP meanwhile. An image migration that touched such a site turned HTTPS back on, so nginx-proxy redirected it to HTTPS and served it with the closest matching certificate of another site (e.g. the parent domain's) until ssl-verify ran.The check is site-command's own
\EE\Site\Utils\is_le_ssl_pending(), the same one refresh andupdate --phpuse in #521. It is called only when it exists: with a site-command that doesn't have it (the current release), the migration behaves exactly as before.Note: a site left pending by an older site-command (HTTPS still on in its compose file, WordPress URLs on
https://) is switched to HTTP by the migration once #521 is in, the same asee site refreshdoes with #521. Moving such sites' WordPress URLs along is a separate follow-up.Depends on / pairs with
is_le_ssl_pending()and the pending state). This PR can merge before or after it; it only takes effect once Databases not dropping properly - weakly-referenced object no longer exists #521 is in.How tested
generate_site_docker_compose_file(): no SSL, LE with and without certificate files (crt only, key only), self/custom/inherit, and the fallback without the helper. Run against site-command develop and Databases not dropping properly - weakly-referenced object no longer exists #521; with Databases not dropping properly - weakly-referenced object no longer exists #521 they fail on develop's code.nohttps, answer 200 over HTTP and aren't served with the parent's certificate, WordPress home stayshttp://; the issued site keeps HTTPS (200, Pebble certificate, HTTP redirects to HTTPS);ee site ssl-verifyafterwards turns HTTPS on for the pending site.SiteContainers.phpwith the same packages: the migration removesnohttpsfrom both pending sites and HTTP redirects to HTTPS served with the parent domain's certificate.