-
Notifications
You must be signed in to change notification settings - Fork 981
Add S3_PUBLIC_URL environment variable #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: build
Are you sure you want to change the base?
Conversation
- Enables CDN integration (CloudFlare, CloudFront, Fastly) for improved performance and reduced bandwidth costs - Required for Cloudflare R2 public access, which mandates custom domains without bucket names in URL paths - Allows custom domain branding (e.g., files.yourcompany.com) instead of exposing cloud provider domains - Provides flexibility for reverse proxies and geo-routing configurations - Backward compatible - existing deployments continue working without changes
|
@gmarcus please remove anything unrelated to your specific feature, including comments co-pilot might have generated |
|
documentation unrelated to your feature should not be changed |
|
@HarrisonFisher Can you please be more specific? The documentation is related to the new |
|
@HarrisonFisher Can you be more specific? What exactly needs to be modified relating to comments or documentation? All edits were specific to the new feature. |
|
@gmarcus check my comment, I gave one example |
|
@HarrisonFisher I don't see any review comments inline. What file(s) and line number(s) are you referring to? |
|
@HarrisonFisher can you respond with the files(s) and line numbers(s) or just comment inline? |
|
@gmarcus check the review comment, i gave an example |
|
@HarrisonFisher Your kidding me right? or are you just an AI? Give me 1 filename:linenumber that you think should be removed from this PR that is not related to the implemented feature |
|
Hi @HarrisonFisher Sorry for being snarky. I think I see where the breakdown in communication is. I am not a collaborator on the project. I cannot see your inline code comments. Can you give me screenshots of your comments so I can clean things up? Here is what I see as a non-collaborator: no review conversation is showing
That specific CLAUDE.md comment screenshot you shared is not showing up for me
|
|
@gmarcus how about now? |
|
@HarrisonFisher Thanks. I was able to see the inline comment on the PR. I cleaned up CLAUDE.md and remove any non-feature related changes. |
|
@HarrisonFisher Happy Holidays. Ready to merge this PR or are there other issues you want me to address? |



Motivation
See discussion at #222
Summary
This PR introduces a new optional environment variable
S3_PUBLIC_URLthat allows users to specify a custom public domain for S3 file URLs, enabling CDN integration, custom domain branding, and proper Cloudflare R2 public access.Changes
• New Environment Variable:
S3_PUBLIC_URL- optional configuration for customizing the base URL of returned file URLsUpdated Files:
◦ .env.example - added configuration example
◦ README.md - documented the new variable with use cases
◦ docker-compose.md - added setup instructions
◦ docs/cloud-installation/do.md - included Digital Ocean-specific guidance
◦ config.py - added configuration loading
◦ services/s3_toolkit.py - implemented URL transformation logic
◦ services/v1/s3/upload.py - applied custom URL for public file uploads
◦ CLAUDE.md - updated documentation with implementation details
Key Features
• CDN Integration: Seamlessly use CloudFlare, AWS CloudFront, Fastly, or other CDNs for improved performance and reduced bandwidth costs
• Cloudflare R2 Support: Enables public file access on R2, which requires custom domains without bucket names in URL paths
• Custom Domain Branding: Use branded domains (e.g., files.yourcompany.com) instead of exposing cloud provider domains
• Flexible Protocol Handling: Automatically prepends https:// if not specified
• Backward Compatible: Existing deployments continue working without any changes
Use Cases
Testing
• Verified backward compatibility (works without the variable set)
• Tested with custom domain URLs (with and without https:// prefix)
• Confirmed bucket name exclusion from public URLs when S3_PUBLIC_URL is set
Image available on Docker Hub as
gmarcus/no-code-architects-toolkit:latest