docker-composer重建webdav服务
date
Jun 4, 2022
slug
newservice-docker-composer-webdav
status
Published
summary
新服务 最简单的WedDav服务
tags
service
type
Post
URL
Summary
步骤
#1
export DOCKER_PROJ=webdav_ford
export DOCKER_PORT=18400
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ
# optional, if using rclone mounted google drive
mkdir -p /drive/gd_stanford/_service/webdav
ln -s /drive/gd_stanford/_service/webdav ./dav
# Basic 方式适合用于http和nginx ssl反代
apt-get install -y apache2-utils
touch user.passwd
htpasswd -B user.passwd webdav_ford
cat > docker-compose.yml <<EOF
version: '3.3'
services:
$DOCKER_PROJ:
container_name: $DOCKER_PROJ
image: bytemark/webdav
restart: always
volumes:
- ./user.passwd:/user.passwd
- ./dav:/var/lib/dav
#ports:
# - '$DOCKER_PORT:80'
environment:
- AUTH_TYPE=Basic
networks:
default:
name: npm_nginx_proxy_manager-network
external: true
EOF
docker-compose up
docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f