docker: 重新组织服务配置
- 用功能更强大的 WebDAV 代替掉 OWSS - WebDAV 和 v2raya 服务都拆成单独的配置文件
This commit is contained in:
36
docker/webdav.yaml
Normal file
36
docker/webdav.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
x-data-volume: &data-volume
|
||||
type: bind
|
||||
source: /var/db/webDAV
|
||||
target: /data
|
||||
|
||||
x-user-dirs: &user-dirs
|
||||
/data/users/PT
|
||||
/data/users/v2rayNG
|
||||
/data/public
|
||||
|
||||
services:
|
||||
WebDAV-init:
|
||||
image: busybox:latest
|
||||
container_name: webdav-init
|
||||
restart: no
|
||||
volumes:
|
||||
- *data-volume
|
||||
environment:
|
||||
DIRS: *user-dirs
|
||||
command: sh -c "mkdir -p $$DIRS"
|
||||
|
||||
WebDAV:
|
||||
image: hacdias/webdav:latest
|
||||
container_name: webdav
|
||||
restart: always
|
||||
depends_on:
|
||||
WebDAV-init:
|
||||
condition: service_completed_successfully
|
||||
command: ["-c", "/config.yaml"]
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./webdav-config.yaml:/config.yaml:ro
|
||||
- /var/log:/logs
|
||||
- *data-volume
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
Reference in New Issue
Block a user