Skip to content

Commit

Permalink
Adding backup feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sebt3 committed Jan 10, 2025
1 parent 92e8990 commit 7a76059
Show file tree
Hide file tree
Showing 54 changed files with 1,230 additions and 115 deletions.
101 changes: 52 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ version = "0.96.0"


[workspace.package]
version = "0.3.2"
version = "0.3.3"
authors = ["Sébastien Huss <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down Expand Up @@ -77,6 +77,7 @@ operator = { cmd=[
"podman build . -f operator/Dockerfile -t docker.io/sebt3/vynil-operator:$(cargo run --bin agent -- version) && podman push docker.io/sebt3/vynil-operator:$(cargo run --bin agent -- version)",
]}
box = { cmd=[
"cargo cmd generate_crd",
"cargo run --bin agent -- package update --source ./box/vynil/",
"cargo run --bin agent -- package build -o ./box/vynil/ --tag $(cargo run --bin agent -- version) -r docker.io -n sebt3/vynil -u $(jq -r '.auths[\"docker.io\"].auth' </run/user/$(id -u)/containers/auth.json |base64 -d|awk -F: '{print $1}') -p $(jq -r '.auths[\"docker.io\"].auth' </run/user/$(id -u)/containers/auth.json |base64 -d|awk -F: '{print $2}')",
]}
4 changes: 3 additions & 1 deletion agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ COPY agent/providers.tf .
RUN tofu init
# Finally assemble everything together
FROM middle AS target
RUN mkdir -p /var/cache/restic /backup /secrets && chown nobody:nogroup /var/cache/restic /backup /secrets
COPY --from=builder /usr/src/agent/target/release/agent /usr/bin/agent
COPY agent/scripts /usr/lib/vynil/scripts
COPY agent/templates /usr/lib/vynil/templates
USER nobody
COPY --from=downloader /src/.terraform/providers /nonexistent/.terraform.d/plugins
WORKDIR /work
ENV SCRIPT_DIRECTORY=/usr/lib/vynil/scripts PACKAGE_DIRECTORY=/package CONFIG_DIR=/etc/vynil
ENV SCRIPT_DIRECTORY=/usr/lib/vynil/scripts TEMPLATE_DIRECTORY=/usr/lib/vynil/templates PACKAGE_DIRECTORY=/package CONFIG_DIR=/etc/vynil XDG_CACHE_HOME=/var/cache/restic
ENTRYPOINT ["agent"]
2 changes: 1 addition & 1 deletion agent/parent.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ version = "0.96.0"


[workspace.package]
version = "0.3.2"
version = "0.3.3"
authors = ["Sébastien Huss <[email protected]>"]
edition = "2021"
license = "BSD-3-Clause"
Expand Down
Loading

0 comments on commit 7a76059

Please sign in to comment.