Add two environments for overriding endpoint and region
export LITESTREAM_ACCESS_KEY_ID=your_key_id export LITESTREAM_SECRET_ACCESS_KEY=your_access_key export LITESTREAM_ENDPOINT=your_endpoint export LITESTREAM_REGION=your_region litestream replicate fruits.db s3://mybkt/fruits.db
This commit is contained in:
committed by
Ben Johnson
parent
7d8b8c6ec0
commit
e6f7c6052d
@@ -703,6 +703,13 @@ func ParseHost(s string) (bucket, region, endpoint string, forcePathStyle bool)
|
||||
endpoint = net.JoinHostPort(endpoint, port)
|
||||
}
|
||||
|
||||
if e := os.Getenv("LITESTREAM_ENDPOINT"); e != "" {
|
||||
endpoint = e
|
||||
}
|
||||
if r := os.Getenv("LITESTREAM_REGION"); r != "" {
|
||||
region = r
|
||||
}
|
||||
|
||||
// Prepend scheme to endpoint.
|
||||
if endpoint != "" {
|
||||
endpoint = scheme + "://" + endpoint
|
||||
|
||||
Reference in New Issue
Block a user