From d7ed99a55f0ae56a363a97644e42f9882826f38c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Nov 2024 13:40:38 -0400 Subject: [PATCH] document p2phttp --directory The option is not implemented yet. --- CHANGELOG | 2 ++ doc/git-annex-p2phttp.mdwn | 33 ++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 249ed77549..76d77db4a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,8 @@ git-annex (10.20241032) UNRELEASED; urgency=medium uses the same hostname as remote.name.url, which is itself a http(s) url, they are assumed to share a username and password. This avoids unnecessary duplicate password prompts. + * p2phttp: Added --directory option which serves all git-annex + repositories located inside a directory. -- Joey Hess Mon, 11 Nov 2024 12:26:00 -0400 diff --git a/doc/git-annex-p2phttp.mdwn b/doc/git-annex-p2phttp.mdwn index 3d10f62198..821503e533 100644 --- a/doc/git-annex-p2phttp.mdwn +++ b/doc/git-annex-p2phttp.mdwn @@ -12,8 +12,12 @@ This is a HTTP server for the git-annex API. It is the git-annex equivilant of git-http-backend(1), for serving a repository over HTTP with write access for authenticated users. -This does not serve the git repository over HTTP, only the git-annex -API. +This does not serve a git repository over HTTP, only the git-annex +API. + +By default, this serves the git-annex API for the git-annex repository +in the current working directory. It can also serve more than one +repository, see the `--directory` parameter. Typically a remote will have `remote.name.url` set to a http url as usual, and `remote.name.annexUrl` set to an annex+http url such as @@ -35,10 +39,25 @@ convenient way to download the content of any key, by using the path # OPTIONS +* `--directory=path` + + Serve each git-annex repository found in a directory. This does not + recurse into subdirectories. + + This option can be provided more than once to serve serveral directories + full of git-annex repositories. + + New git-annex repositories can be added to the directory, and will be + noticed and served immediately. There is no need to restart the server. + + When a git-annex repository is removed from the directory, the server + will stop serving it as well. This may not be immediate, as some files + in the deleted repository may still be open. + * `--jobs=N` `-JN` This or annex.jobs must be set to configure the number of worker - threads that serve connections to the webserver. + threads, per repository served, that serve connections to the webserver. Since the webserver itself also uses one of these threads, this needs to be set to 2 or more. @@ -47,15 +66,15 @@ convenient way to download the content of any key, by using the path * `--proxyconnections=N` - When this command is run in a repository that is configured to act as a - proxy for some of its remotes, this is the maximum number of idle - connections to keep open to proxied remotes. + When serving a repository that is configured to act as a proxy for some + of its remotes, this is the maximum number of idle connections to keep + open to proxied remotes. The default is 1. * `--clusterjobs=N` - When this command is run in a repository that is a gateway for a cluster, + When serving a repository that is a gateway for a cluster, this is the number of concurrent jobs to use to access nodes of the cluster, per connection to the webserver.