"I hope you like Rust and HTTP Redirects" -- Alex v.
This microservice redirects incoming requests to remote s3 buckets while keeping track of aliases such as "current" for the repo version.
Rocket still requires nightly rust. It appears Rocket 0.5.0 will no longer require nightly rust... then we can flip the docker image to rust:alpine from rustlang/rust:nightly
This microservice expects repos in the following format:
(s3_prefix)/branch/arch/version/...
Required:
- /run/secrets/s3_endpoint - Object Storage host (ex: https://s3.myprovider.com)
- /run/secrets/s3_bucket - Bucket containing repos (ex: haiku-repositories)
- /run/secrets/s3_key - Access key
- /run/secrets/s3_secret - Access secret
Optional:
- /run/secrets/cache_ttl - How often to scan s3 buckets for latest versions (default 900)
- /run/secrets/s3_region - Bucket region (default "us-east-1")
- /run/secrets/s3_prefix - Prefix within bucket to repos with no leading / (default "", ex: "myrepos/")
- /run/secrets/public_url - Public URL of object storage. (default: S3_ENDPOINT + S3_BUCKET)
Required:
- S3_ENDPOINT - Object Storage host (ex: https://s3.myprovider.com)
- S3_BUCKET - Bucket containing repos (ex: haiku-repositories)
- S3_KEY - Access key
- S3_SECRET -- Access secret
Optional:
- CACHE_TTL - How often to scan s3 buckets for latest versions (default 30)
- S3_REGION - Bucket region (default "us-east-1")
- S3_PREFIX - Prefix within bucket to repos with no leading / (default "", ex: "myrepos/")
- PUBLIC_URL - Public URL of object storage. (default: S3_ENDPOINT + S3_BUCKET)
- Package popularity contest
- Better web ui for repos
- Geoip / Geoip aware package redirects
Copyright, 2019-2021 Haiku, Inc. All rights reserved. Released under the terms of the MIT license.