Proxy container#908
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Ensure BLOT_HOST is set | ||
| echo "BLOT_HOST=$BLOT_HOST" | ||
|
|
||
| # Check if AWS credentials are set | ||
| if [[ -n "$AWS_ACCESS_KEY_ID" && -n "$AWS_SECRET_ACCESS_KEY" && -n "$AWS_REGION" ]]; then | ||
| echo "AWS credentials detected. Using DNS challenge for wildcard certificate." | ||
| DNS_PROVIDER="--dns-provider route53" | ||
| DOMAIN="-d *.$BLOT_HOST" | ||
| else | ||
| echo "AWS credentials not found. Falling back to HTTP challenge for single-domain certificate." | ||
| DNS_PROVIDER="" | ||
| DOMAIN="-d $BLOT_HOST" |
There was a problem hiding this comment.
Validate required BLOT_HOST before invoking acme-nginx
The entrypoint prints BLOT_HOST=$BLOT_HOST but never fails fast when the variable is empty. If the container starts without BLOT_HOST set, the script still executes acme-nginx with DOMAIN="-d ", which causes certificate generation to error and the proxy never starts. Consider checking the value and exiting with a clear message before attempting to create certificates.
Useful? React with 👍 / 👎.
|
@codex fix: The entrypoint prints BLOT_HOST=$BLOT_HOST but never fails fast when the variable is empty. If the container starts without BLOT_HOST set, the script still executes acme-nginx with DOMAIN="-d ", which causes certificate generation to error and the proxy never starts. Consider checking the value and exiting with a clear message before attempting to create certificates. |
|
Summary
Testing
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
/etc/resty-auto-ssl/letsencrypt/etc/ssl/Ensure the new volume has access to the following directories:
Migrating OpenResty to Docker with iptables Redirects
1. Start Temporary OpenResty Container
Launch OpenResty on alternate ports (
8080for HTTP,8443for HTTPS):2. Redirect Traffic Using iptables
Redirect incoming traffic on ports
80and443to the container:Verify traffic redirection:
3. Launch Final OpenResty Container on Ports 80 & 443
Once verified, start a second container on the correct ports:
Confirm it works directly:
4. Remove iptables Redirects
Now that OpenResty is handling traffic natively, remove the
iptablesrules:5. Cleanup Temporary Container
Stop and remove the temporary container:
6. Final Checks & Persistence