Add domain and subdomain support for MinioAPI

This change brings in domain and subdomain support

   - ./minio --domain "yourminiodomain.com"

This change brings in a much needed feature by keeping
bucketnames as part of your 'DNS' name.

All your existing applications can be migrated off from s3 to
Minio without little to no modifications.

NOTE: Setting up DNS for your `buckets` is out of scope of this feature
This commit is contained in:
Harshavardhana
2015-02-23 02:11:27 -08:00
parent 2d3b00b831
commit 51e80eaa6d
13 changed files with 236 additions and 148 deletions
+8
View File
@@ -41,6 +41,7 @@ func getStorageType(input string) server.StorageType {
func runCmd(c *cli.Context) {
storageTypeStr := c.String("storage-type")
domain := c.String("domain")
apiaddress := c.String("api-address")
webaddress := c.String("web-address")
certFile := c.String("cert")
@@ -52,6 +53,7 @@ func runCmd(c *cli.Context) {
storageType := getStorageType(storageTypeStr)
var serverConfigs []server.ServerConfig
apiServerConfig := server.ServerConfig{
Domain: domain,
Address: apiaddress,
Tls: tls,
CertFile: certFile,
@@ -61,6 +63,7 @@ func runCmd(c *cli.Context) {
},
}
webUiServerConfig := server.ServerConfig{
Domain: domain,
Address: webaddress,
Tls: false,
CertFile: "",
@@ -79,6 +82,11 @@ func main() {
app.Name = "minio"
app.Usage = ""
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "domain,d",
Value: "",
Usage: "address for incoming API requests",
},
cli.StringFlag{
Name: "api-address,a",
Value: ":9000",