Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.

Problems with S3 URL generation #167

Open
cboden opened this issue Oct 19, 2021 · 2 comments
Open

Problems with S3 URL generation #167

cboden opened this issue Oct 19, 2021 · 2 comments

Comments

@cboden
Copy link

cboden commented Oct 19, 2021

My config looks like this:

{
  default: "minio",
  disks: {
    minio: {
      driver: "s3",
      config: {
        key: "root",
        secret: "password",
        endpoint: "http://127.0.0.1:9000",
        bucket: "mybucket",
        region: "us-east-1",
      },
    },
  },
}

And when I attempt to read/write I get a large error that includes the message:

UnknownEndpoint: Inaccessible host: mybucket.127.0.0.1. This service may not be available in the us-east-1

It seems flydrive is assuming a domain name, which is how AWS configures their servers, but is not how the protocol is defined.

How can I configure flydrive to access my MinIO container without a subdomain requirement?

@cboden
Copy link
Author

cboden commented Oct 20, 2021

For anyone else looking to get MinIO working with this library, alter your config to look like this:

{
  default: "minio",
  disks: {
    minio: {
      driver: "s3",
      config: {
        key: "root",
        secret: "password",
        endpoint: "http://127.0.0.1:9000/mybucket",
        bucket: "mybucket",
        region: "us-east-1",
        s3BucketEndpoint: true,
      },
    },
  },
}

@jthomaschewski
Copy link

I'm successfully using the following config.
Note: My minio instance is accessible from public with https

{
  default: "minio",
  disks: {
    minio: {
      driver: "s3",
      config: {
        key: "username",
        secret: "password",
        endpoint: "minio.myserver.tld",
        bucket: "mybucket",
        region: "us-east-1",
        s3ForcePathStyle: true,
      },
    },
  },
}

The important bit here is s3ForcePathStyle.
With this option everything should work without having subdomain routing configured.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants