Skip to content

Commit 46704a6

Browse files
Add OverlayBlobStore
1 parent 59094ba commit 46704a6

File tree

7 files changed

+724
-1
lines changed

7 files changed

+724
-1
lines changed

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# Multistage - Builder
2+
FROM maven:3.6.3-jdk-11-slim as s3proxy-builder
3+
LABEL maintainer="Andrew Gaul <andrew@gaul.org>"
4+
5+
COPY . /opt/s3proxy/
6+
WORKDIR /opt/s3proxy
7+
RUN mvn package -DskipTests
8+
9+
# Multistage - Image
110
FROM openjdk:11-jre-slim
211
LABEL maintainer="Andrew Gaul <andrew@gaul.org>"
312

@@ -20,6 +29,9 @@ ENV \
2029
S3PROXY_CORS_ALLOW_METHODS="" \
2130
S3PROXY_CORS_ALLOW_HEADERS="" \
2231
S3PROXY_IGNORE_UNKNOWN_HEADERS="false" \
32+
S3PROXY_OVERLAY_BLOBSTORE="false" \
33+
S3PROXY_OVERLAY_BLOBSTORE_MASK_SUFFIX="__deleted" \
34+
S3PROXY_OVERLAY_BLOBSTORE_PATH="/tmp" \
2335
S3PROXY_ENCRYPTED_BLOBSTORE="" \
2436
S3PROXY_ENCRYPTED_BLOBSTORE_PASSWORD="" \
2537
S3PROXY_ENCRYPTED_BLOBSTORE_SALT="" \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ S3Proxy can modify its behavior based on middlewares:
107107
* [large object mocking](https://github.com/gaul/s3proxy/wiki/Middleware-large-object-mocking)
108108
* [read-only](https://github.com/gaul/s3proxy/wiki/Middleware-read-only)
109109
* [sharded backend containers](https://github.com/gaul/s3proxy/wiki/Middleware-sharded-backend)
110+
* [overlay blobstore]()
110111

111112
## Limitations
112113

src/main/java/org/gaul/s3proxy/Main.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,17 @@ private static BlobStore parseMiddlewareProperties(BlobStore blobStore,
240240
blobStore = ReadOnlyBlobStore.newReadOnlyBlobStore(blobStore);
241241
}
242242

243+
String overlayBlobStore = properties.getProperty(
244+
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE);
245+
if("true".equalsIgnoreCase(overlayBlobStore)) {
246+
System.err.println("Overlaying storage backend with local BlobStore");
247+
String overlayPath = properties.getProperty(
248+
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE_PATH);
249+
String overlayMaskSuffix = properties.getProperty(
250+
S3ProxyConstants.PROPERTY_OVERLAY_BLOBSTORE_MASK_SUFFIX);
251+
blobStore = OverlayBlobStore.newOverlayBlobStore(blobStore, overlayPath, overlayMaskSuffix);
252+
}
253+
243254
ImmutableBiMap<String, String> aliases = AliasBlobStore.parseAliases(
244255
properties);
245256
if (!aliases.isEmpty()) {

0 commit comments

Comments
 (0)