这是indexloc提供的服务,不要输入任何密码
Skip to content

Confusing default directory #279

@victor-sm

Description

@victor-sm

First of all this is a very cool project, thank you for all the work.

While setting this up as a docker container and reading the documentation, I stumbled over the default configuration. As a new user it is very easy to set up the server without a persistent data volume.

The docker example uses /data as the persistent data directory:

docker run \
  -p 6060:6060 \
  -v $(pwd)/config.yml:/config.yml:ro \
  -v $(pwd)/data:/data \
  ghcr.io/hacdias/webdav -c /config.yml

However, the example config uses:

# The directory that will be able to be accessed by the users when connecting.
# This directory will be used by users unless they have their own 'directory' defined.
# Default is '.' (current directory).
directory: .

# [...]

users:
  - username: john
    password: "{bcrypt}$2y$10$zEP6oofmXFeHaeMfBNLnP.DO8m.H.Mwhd24/TOX2MWLxAExXi4qgi"
    directory: /another/path

With no prior knowledge it is very easy to conclude, that all config paths are relative to the /data directory, since it is very atypical to store data directly in the root directory.

I would propose to change the example configuration to use /data in their paths and add a comment to the docker example clarifying that all paths are absolute, and thus additional volumes might be required.

I could submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions