Accessing Minio through Container ID
-
wrote 16 days ago last edited by
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:9000
Unfortunately 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 .
-
-