Skip to content

MaRDI4NFDI/s3-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Proxy Service

A simple FastAPI service that provides public access to files stored in private S3-compatible storage. Designed for MediaWiki instances using Extension:AWS where the S3 bucket is only accessible within a VPN or private network.

Environment Variables

Set these environment variables before running the service:

S3_ACCESS_KEY_ID="your_access_key"
S3_SECRET_ACCESS_KEY="your_secret_key"
S3_REGION="eu-central-1"
S3_BUCKET_NAME="your-bucket-name"
S3_ENDPOINT="https://your-s3-endpoint.com"

Mediawiki configuration

Add this configuration to LocalSettings.php:

wfLoadExtension( 'AWS' );

$wgAWSCredentials = [
	'key' => getenv('S3_ACCESS_KEY_ID'),
	'secret' => getenv('S3_SECRET_ACCESS_KEY'),
	'token' => false
];

$s3endpoint = getenv('S3_ENDPOINT');
$wgAWSRegion = getenv('S3_REGION')
$wgAWSBucketName = getenv('S3_BUCKET_NAME')

$wgAWSBucketDomain = 'files.yourdomain.com';

For further details on configuring the AWS extension on Mediawiki, see the documentation for the AWS extension.

About

Simple proxy for delivering images from a private S3 bucket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages