What is this?
When you're using NextCloud (the "nc" part of the name of this) and you're using an object store (like AWS S3 or Digital Ocean 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, for example, those files will be missing.
nc-dirs will scan the object store and add the missing "directory" files.
To run, you'll need some environment variables:
NC_REGIONwith the region name.
NC_ENDPOINTwith the storage endpoint.
NC_BUCKETwith the bucket name you want to scan and ensure the files are there.
NC_ACCESS_KEYwith the access key to access the bucket.
NC_SECRET_KEYwith 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.)