File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ RUN mkdir ./src && echo 'fn main() { panic!("Dummy Image Called!")}' > ./src/mai
9
9
RUN cargo build --release
10
10
11
11
# Copy source files over
12
- RUN rm -rf ./src && rm -rf ./target/release
12
+ RUN rm -rf ./src
13
13
COPY ./src ./src
14
14
15
15
# The last modified attribute of main.rs needs to be updated manually,
@@ -22,7 +22,8 @@ FROM debian:stable-slim
22
22
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates zstd && \
23
23
apt-get clean && \
24
24
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25
- COPY --from=rust-builder /build/target/release/s-backup /usr/local/bin/
26
- WORKDIR /usr/local/bin
27
- CMD ["s-backup" ]
25
+ COPY --from=rust-builder /build/target/release/s-backup /app/
26
+ ENV TZ=Etc/UTC
27
+ WORKDIR /app
28
+ ENTRYPOINT ["/app/s-backup" ]
28
29
Original file line number Diff line number Diff line change @@ -6,13 +6,14 @@ region = "region_name"
6
6
secret_access_key = " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
7
7
8
8
[[backup ]]
9
- exclude = [" data" ]
9
+ exclude = [" exclude " , " data" ]
10
10
name = " test"
11
11
path = " ../test-rust"
12
12
interval = 86400
13
+ keep = 5
13
14
14
15
[[backup ]]
15
- exclude = [" data" ]
16
+ exclude = [" exclude " , " data" ]
16
17
name = " test2"
17
18
path = " ../test-rust"
18
19
interval = 43200
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ services:
5
5
image : s-backup:latest
6
6
restart : unless-stopped
7
7
environment :
8
- RUST_LOG : " info "
8
+ - TZ=Etc/UTC
9
9
volumes :
10
- - ./data:/data
10
+ - ./config.toml:/app/config.toml
11
+ - /path/to/backup:/backup_path_in_config:ro
12
+ command : [run, --config, ./config.toml]
You can’t perform that action at this time.
0 commit comments