Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ COPY shared ./shared

RUN cargo build --release

RUN mkdir /stage && cp --parents /usr/lib/$(gcc -print-multiarch)/libzstd.so.1 /stage
RUN mkdir /stage /synapse-cache && cp --parents /usr/lib/$(gcc -print-multiarch)/libzstd.so.1 /stage

# Runtime stage
FROM gcr.io/distroless/cc-debian13:nonroot
WORKDIR /app

COPY --from=builder /app/target/release/synapse synapse
COPY --from=builder /stage/ /
COPY --from=builder --chown=nonroot:nonroot /synapse-cache /tmp/synapse-cache

ENTRYPOINT ["/app/synapse"]
CMD []
1 change: 0 additions & 1 deletion devservices/ingest-router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ingest_router:
url: http://host.docker.internal:8000
backup_route_store:
type: filesystem
base_dir: /tmp/synapse-cache
filename: backup.bin
compression: zstd1
localities:
Expand Down
1 change: 0 additions & 1 deletion devservices/proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ proxy:
url: http://host.docker.internal:8000
backup_route_store:
type: filesystem
base_dir: /tmp/synapse-cache
filename: backup.bin
compression: zstd1
localities:
Expand Down
5 changes: 5 additions & 0 deletions locator/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ pub enum Compression {
Zstd3,
}

fn default_base_dir() -> String {
"/tmp/synapse-cache".into()
}

#[derive(Clone, Deserialize, Debug, PartialEq)]
#[serde(rename_all = "snake_case")]
#[serde(tag = "type")]
pub enum BackupRouteStoreType {
Filesystem {
#[serde(default = "default_base_dir")]
base_dir: String,
filename: String,
compression: Compression,
Expand Down
Loading