1.0, latest]
services:
webdav:
container_name: webdav
image: cwjii/webdav-nginx:latest
restart: always
environment:
TZ: Asia/Hong_Kong
PUID: 1000
PGID: 1000
ports:
- 80:80
volumes:
- ./data:/data
Specifying USERNAME and PASSWORD only supports a single user.
services:
webdav:
...
environment:
...
USERNAME: guest
PASSWORD: test
If you want to have lots of different logins for various users,
bind mount your own file to /etc/nginx/htpasswd and the container will use that instead.
run the following commands:
touch user.passwd
htpasswd -B user.passwd alice
htpasswd -B user.passwd bob
Once you've created your own user.passwd, bind mount it into your container:
services:
webdav:
...
volumes:
...
# bind mount `htpasswd` into your container
- ./user.passwd:/etc/nginx/htpasswd
services:
webdav:
...
labels:
- "traefik.enable=true"
- "traefik.http.routers.webdav.rule=Host(`webdav.domain.com`)"
- "traefik.http.routers.webdav.entrypoints=foo"
- "traefik.http.routers.webdav.service=webdav"
- "traefik.http.services.webdav.loadbalancer.server.port=80"
- "traefik.http.services.webdav.loadbalancer.server.scheme=http"
# use webdav basicauth
# - "traefik.http.routers.webdav.middlewares=webdav-auth"
# - "traefik.http.middlewares.webdav-auth.basicauth.users=guest:$$apr1$$wJ.CCIEe$$gdNQGpB3a4k.m7r06HtO31"
dom111/webdav-js docker-projects/docker-webdav-alpine uGeek/docker-webdav
Content type
Image
Digest
sha256:6c177c148…
Size
8.6 MB
Last updated
over 2 years ago
docker pull cwjii/webdav-nginx