This repository has been archived on 2026-03-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2020-10-02 09:37:38 +02:00
2019-11-28 22:46:45 +01:00
2019-06-20 13:57:45 +02:00
2019-06-20 13:07:42 +02:00
2019-06-20 13:07:42 +02:00
2020-10-02 09:37:38 +02:00
2019-06-28 16:07:04 +02:00

nginx-s3-upload

Uploads files to s3 bucket. Basically an nginx which proxy_pass HTTP POST requests to S3 directly

Configuration

Environment variables are used to provide configuration.

Variable name Comment 
S3_BUCKET_NAME Mandatory
AWS_REGION Mandatory
RETURN_URL Mandatory
AWS_ACCESS_KEY_ID Optional - will be fetched from IAM policy on AWS
AWS_SECRET_ACCESS_KEY Optional - will be fetched from IAM policy on AWS

Testing

docker run --rm --env AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} --env AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} --env S3_BUCKET_NAME=upload.example.com --env AWS_REGION=eu-west-1 --env RETURN_URL=images.example.com -p 8000:80 gitlab.com/unboundsoftware/nginx-s3-upload:1.1.0

Try it out:

curl localhost:8000/upload -d 'some data' -v
...
> PUT /upload HTTP/1.1
 ...
< X-File-URL: https://images.example.com/59389abb021973a41d05e0d7d79949b17b83b142058a3704c98f274b6e563cfc403e64db6550f233
...

The header X-File-URL will contain the URL to the uploaded file.

S
Description
No description provided
Readme 153 KiB
Languages
Lua 98.5%
Dockerfile 1.4%
Shell 0.1%