diff --git a/Dockerfile b/Dockerfile index 7862ca0..2a4c079 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG BUN_VERSION="1.3.1" FROM oven/bun:${BUN_VERSION}-alpine AS base -RUN apk add --no-cache davfs2=1.6.1-r2 +RUN apk add --no-cache davfs2=1.6.1-r2 openssh-client # ------------------------------ diff --git a/app/client/components/create-repository-form.tsx b/app/client/components/create-repository-form.tsx index 4c511e3..fd1cfaa 100644 --- a/app/client/components/create-repository-form.tsx +++ b/app/client/components/create-repository-form.tsx @@ -27,6 +27,7 @@ import { AlertDialogHeader, AlertDialogTitle, } from "./ui/alert-dialog"; +import { Textarea } from "./ui/textarea"; export const formSchema = type({ name: "2<=string<=32", @@ -53,6 +54,7 @@ const defaultValuesForType = { azure: { backend: "azure" as const, compressionMode: "auto" as const }, rclone: { backend: "rclone" as const, compressionMode: "auto" as const }, rest: { backend: "rest" as const, compressionMode: "auto" as const }, + sftp: { backend: "sftp" as const, compressionMode: "auto" as const, port: 22 }, }; export const CreateRepositoryForm = ({ @@ -141,6 +143,7 @@ export const CreateRepositoryForm = ({ Google Cloud Storage Azure Blob Storage REST Server + SFTP @@ -268,18 +271,11 @@ export const CreateRepositoryForm = ({
{form.watch("path") || "/var/lib/zerobyte/repositories"}
- - - The directory where the repository will be stored. - + The directory where the repository will be stored. @@ -290,13 +286,9 @@ export const CreateRepositoryForm = ({ Important: Host Mount Required -

- When selecting a custom path, ensure it is mounted from the host machine into the - container. -

+

When selecting a custom path, ensure it is mounted from the host machine into the container.

- If the path is not a host mount, you will lose your repository data when the container - restarts. + If the path is not a host mount, you will lose your repository data when the container restarts.

The default path /var/lib/zerobyte/repositories is @@ -703,6 +695,89 @@ export const CreateRepositoryForm = ({ )} + {watchedBackend === "sftp" && ( + <> + ( + + Host + + + + SFTP server hostname or IP address. + + + )} + /> + ( + + Port + + field.onChange(parseInt(e.target.value, 10))} + /> + + SSH port (default: 22). + + + )} + /> + ( + + User + + + + SSH username for authentication. + + + )} + /> + ( + + Path + + + + Repository path on the SFTP server. + + + )} + /> + ( + + SSH Private Key + +