-
Notifications
You must be signed in to change notification settings - Fork 482
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
feat: support custom proxy image repository #1202
base: main
Are you sure you want to change the base?
Conversation
songjiz
commented
Nov 7, 2024
- Allow users to specify custom proxy image repository instead of using default basecamp/kamal-proxy
- Help users in regions where Docker Hub access is restricted (e.g. China) to pull proxy image from cloud vendor repositories
- Move proxy related configurations from configuration to proxy
9fe2498
to
8425e72
Compare
lib/kamal/configuration/proxy.rb
Outdated
HTTP_PORT = 80 | ||
HTTPS_PORT = 443 | ||
LOG_MAX_SIZE = "10m" | ||
MINIMUM_VERSION = "v0.8.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice clean up!
I was also looking at proxy configuration options, hoping too override the version with a newer one - see #1252
Would love to see this get introduced/merged! Reason being; Currently Kamal Proxy doesn't have built in support for "Authenticated Origin Pulls" with Cloudflare (requires you to specify a CA Cert, etc), (which is okay.. I get it.. Kamal Proxy is designed to be simple) so I'd most likely fork Kamal Proxy for the time being, add that support, and upload it to Docker Hub or something. Being able to specify my own image would be awesome! |
I also ran into DockerHub's rate-limiting here. My app's image is hosted on Gitlab's registry, which means that when the server tries to I've gotten around the issue by monkey-patching over this in diff --git a/bin/kamal b/bin/kamal
index cbe59b9..44f6b98 100755
--- a/bin/kamal
+++ b/bin/kamal
@@ -24,4 +24,14 @@ end
require "rubygems"
require "bundler/setup"
+#-- PATCH
+require "kamal"
+class Kamal::Configuration
+ def proxy_image
+ # "basecamp/kamal-proxy:#{PROXY_MINIMUM_VERSION}"
+ "registry.gitlab.com/myuser/myapp/kamal-proxy:v0.8.2"
+ end
+end
+#--
+
load Gem.bin_path("kamal", "kamal") (and pushing a copy of the Official support for this would be great. |
- Allow users to specify custom proxy image repository instead of using default basecamp/kamal-proxy - Help users in regions where Docker Hub access is restricted (e.g. China) to pull proxy image from cloud vendor repositories - Move proxy related configurations from configuration to proxy
8425e72
to
77593f5
Compare