From 340cd75ac04581fe88a6fa82c939f6f9c9ed74dc Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Fri, 14 Feb 2025 17:32:50 +0800 Subject: [PATCH] add(dufs): add dufs stack --- dufs/config/config.yaml | 26 ++++++++++++++++++++++++++ dufs/env.cfg | 2 ++ dufs/stack.yml | 20 ++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 dufs/config/config.yaml create mode 100644 dufs/env.cfg create mode 100644 dufs/stack.yml diff --git a/dufs/config/config.yaml b/dufs/config/config.yaml new file mode 100644 index 0000000..f8b8ac7 --- /dev/null +++ b/dufs/config/config.yaml @@ -0,0 +1,26 @@ +serve-path: '.' +bind: 0.0.0.0 +port: 5000 +path-prefix: /dufs +hidden: + - tmp + - '*.log' + - '*.lock' +auth: + - admin:admin@/:rw + - user:pass@/src:rw,/share + - '@/' # According to the YAML spec, quoting is required. +allow-all: false +allow-upload: true +allow-delete: true +allow-search: true +allow-symlink: true +allow-archive: true +enable-cors: true +render-index: true +render-try-index: true +render-spa: true +assets: ./assets/ +log-format: '$remote_addr "$request" $status $http_user_agent' +log-file: ./dufs.log +compress: low diff --git a/dufs/env.cfg b/dufs/env.cfg new file mode 100644 index 0000000..fd99ef6 --- /dev/null +++ b/dufs/env.cfg @@ -0,0 +1,2 @@ +IMAGE_TAG=sigoden/dufs:v0.43.0 +Volumes_Path=/data/volumes/dufs \ No newline at end of file diff --git a/dufs/stack.yml b/dufs/stack.yml new file mode 100644 index 0000000..b4e3665 --- /dev/null +++ b/dufs/stack.yml @@ -0,0 +1,20 @@ +# path:: mkdir -pv /data/volumes/dufs/data +# pull:: docker compose -p memos --env-file ./dufs/env.cfg -f ./dufs/stack.yml pull +# run:: docker compose -p memos --env-file ./dufs/env.cfg -f ./dufs/stack.yml up -d + +services: + dufs: + image: ${IMAGE_TAG} + container_name: dufs + environment: + - TZ=Asia/Shanghai + ports: + - 5000:5000 + command: /data --config /config/config.yaml + volumes: + - ${Volumes_Path}/data:/data + - ./config:/config + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + restart: unless-stopped +