diff --git a/README.md b/README.md index 9d52849..b733099 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,9 @@ config.vm.define "s3" do |s3| d.image = "jean553/docker-s3-server-dev" d.env = { "S3_BUCKET_NAME" => "MyBucketName", + "CORS_CONF_PATH" => "config/cors-config.xml" } end + config.vm.synced_folder "config/", "/config" end ``` diff --git a/launch_server.sh b/launch_server.sh index 758aae8..12378c5 100644 --- a/launch_server.sh +++ b/launch_server.sh @@ -1,7 +1,15 @@ #!/usr/bin/env bash +# build the s3rver command +COMMAND="s3rver --hostname 0.0.0.0 --port 5000 --directory /tmp" +if [ -n ${CORS_CONF_PATH} ] +then + COMMAND="$COMMAND --cors $CORS_CONF_PATH" +fi +COMMAND="$COMMAND &" + # Launch the local S3 server -s3rver --hostname 0.0.0.0 --port 5000 --directory /tmp & +$COMMAND # Wait 2 seconds to give the server the time to be up sleep 2