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

Conversation

@vizog
Copy link
Contributor

@vizog vizog commented Dec 6, 2017

This PR adds these environment variables which are read by Main:

  1. S3MOCK_PORT: Changes the default (8001) port on the server
  2. REPOSITORY_PATH: If set to an address, the server creates the repository on the given path rather than creating a temporary file. This helps to persist the files when the docker container restarts.
  3. BUCKET_NAME: Enables automatic creation of a bucket with the given name

Enables automatic creation of a bucket with environment variable

Copy link

@mgladdish mgladdish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of env vars, can the options be read from play-config instead? You can still set them from env vars if you need to.

}

def clientFor(host: String, port: Int): AmazonS3 = {
val endpoint = new EndpointConfiguration(s"http://$host:$port", "eu-west-1")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the region parameterised, too?

@vizog
Copy link
Contributor Author

vizog commented Mar 1, 2018

@mgladdish I agree that moving the config to play config gives more flexibility but I guess it's better to create another PR for that because it involves changing S3mock.scala or providers. The actor system which picks up the configs is not started in Main class

mgladdish added a commit to mgladdish/s3mock that referenced this pull request Mar 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants