Accessing Minio through Container ID
-
I'm hosting a mastodon instance and a minio storage on the same Cloudron. Both subdomains are setup to use the Cloudflare proxy. I tried resolving minio's URL using the mastodon container's terminal and I realized that it resolves to the Cloudflare proxy IP. This could cause unnecessary external network traffic. So I tried different S3 settings in the mastodon env.production in order to make it communicate with minio locally. I finally manager to make it work using the Docker container ID. So I wanted to share this in case it can be helpful to someone. Here is what it looks like:
S3_HOSTNAME=minio.example.com S3_ENDPOINT=http://1234567-890-123-456-1234567:9000Unfortunately I didn't manager to do the same with Nextcloud for connecting to Collabora.
-
@gerard the container id is not a constant. It will keep changing on updates . the port 9000 is also packaging specific, but it's quite unlikely this port changes.
An idea might be to add the minio domain in the /etc/hosts (on the server) to point to the server IP .
-
@gerard the container id is not a constant. It will keep changing on updates . the port 9000 is also packaging specific, but it's quite unlikely this port changes.
An idea might be to add the minio domain in the /etc/hosts (on the server) to point to the server IP .
-
N nebulon marked this topic as a question on
-
N nebulon has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login