docker: 重新组织服务配置
- 用功能更强大的 WebDAV 代替掉 OWSS - WebDAV 和 v2raya 服务都拆成单独的配置文件
This commit is contained in:
@@ -1,17 +1,4 @@
|
|||||||
services:
|
services:
|
||||||
owss:
|
|
||||||
image: ronggang/owss:latest
|
|
||||||
container_name: owss
|
|
||||||
restart: always
|
|
||||||
privileged: true
|
|
||||||
# host 模式和 bridge 模式二选一
|
|
||||||
network_mode: host
|
|
||||||
# ports:
|
|
||||||
# - "8088:8088"
|
|
||||||
volumes:
|
|
||||||
- /OWSS/storage:/app/storage
|
|
||||||
- /OWSS/config:/app/config
|
|
||||||
|
|
||||||
v2raya:
|
v2raya:
|
||||||
image: mzz2017/v2raya:latest
|
image: mzz2017/v2raya:latest
|
||||||
container_name: v2raya
|
container_name: v2raya
|
||||||
36
docker/webdav-config.yaml
Normal file
36
docker/webdav-config.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
address: 0.0.0.0
|
||||||
|
port: 46065
|
||||||
|
auth: true
|
||||||
|
prefix: /
|
||||||
|
tls: false
|
||||||
|
behindProxy: true
|
||||||
|
log:
|
||||||
|
format: console
|
||||||
|
colors: true
|
||||||
|
outputs:
|
||||||
|
- /logs/webdav.log
|
||||||
|
logLevel: info
|
||||||
|
|
||||||
|
directory: /data
|
||||||
|
permissions: R
|
||||||
|
|
||||||
|
users:
|
||||||
|
- username: zedhugh
|
||||||
|
password: "{bcrypt}$2a$10$nP6GQJidzLyhwkkQGQH/KOAQq2KjNW5Fbb.I/XD2OD2oxCxEoXbUO"
|
||||||
|
directory: /data
|
||||||
|
permissions: CRUD
|
||||||
|
|
||||||
|
- username: PT
|
||||||
|
password: "{bcrypt}$2a$10$cK9NWvSafxne2Fv6P6ZH7.Q/tVKk5M4pqXgsuOi2bF/zsCopFHsC2"
|
||||||
|
directory: /data/users/PT
|
||||||
|
permissions: CRUD
|
||||||
|
|
||||||
|
- username: v2rayNG
|
||||||
|
password: "{bcrypt}$2a$10$jvjejyOea8Xqsik8a9M71.rvC/0kdFah2WuMCTKHBQJ8PxGkdFmKC"
|
||||||
|
directory: /data/users/v2rayNG
|
||||||
|
permissions: CRUD
|
||||||
|
|
||||||
|
- username: guest
|
||||||
|
password: "guest"
|
||||||
|
directory: /data/public
|
||||||
|
permissions: R
|
||||||
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
|
||||||
Binary file not shown.
Reference in New Issue
Block a user