From afc404b7b7339571070b854ee3f9bfa4cfbba435 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 19 Aug 2019 12:50:46 -0300 Subject: [PATCH] Added a readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9fad3ad --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# NC-DIRS + +## What is this? + +When you're using [NextCloud](https://nextcloud.com/) (the "nc" part of the +name of this) and you're using an object store (like [AWS +S3](https://aws.amazon.com/s3/) or [Digital Ocean +Spaces](https://www.digitalocean.com/products/spaces/)), it will need some +special files, marked with content-type "unix/http-directory" to understand +directories; when those files are missing, NextCloud will not show the +directories. + +Uploading files directly from the NextCloud interface will create those files, +but you use some other tool, like [s3cmd](https://s3tools.org/s3cmd), for +example, those files will be missing. + +`nc-dirs` will scan the object store and add the missing "directory" files. + +## Running + +To run, you'll need some environment variables: + +* `NC_REGION` with the region name. +* `NC_ENDPOINT` with the storage endpoint. +* `NC_BUCKET` with the bucket name you want to scan and ensure the files are + there. +* `NC_ACCESS_KEY` with the access key to access the bucket. +* `NC_SECRET_KEY` with the secret key to access the bucket. + +(`NC_ENDPOINT` may seem redundant if you're using AWS S3, but as a Digital +Ocean Spaces client, I need that to be able to access it properly.)