@aeppic/install-repository-server installs the a repository server to host binary files compatible with
It automatically registers (installs) the service as a SystemD service under
/etc/systemd/system but does not enable or start it yet.
It is as simple as possible, directly contained in this module, and just copies itself to the install location. An install requires the service to not already run, existing data never gets touched.
Installing a custom repository server is only required when running accessing the curasystems registry is not possible.
Uploaded files should follow the naming convention
Upload and Download is only possible if the correct token is available. These are stored in JSON files see below.
Launch example server
Upload a new file
<filepath> equals a path to a packaged file
Note: The path can include directories, but only the filename is used in the uploaded name.
curl -XPOST -H "Authorization: Bearer <TOKEN_FROM_UPLOAD_TOKENS_JSON>" --form file=@<filepath> http://localhost:8881
curl -H "Authorization: Bearer <TOKEN_FROM_DOWNLOAD_TOKEN_JSON>" http://localhost:8881/<filename>
Tag a file
<tagname> is the name of the tag to use. It is a string with at least 3 characters and starting with a letter
curl -XPOST -H "Authorization: Bearer <TOKEN_FROM_UPLOAD_TOKENS_JSON>" http://localhost:8881/<filename>/tags/<tagname>
List all known files
curl -H "Authorization: Bearer <TOKEN_FROM_DOWNLOAD_TOKEN_JSON>" http://localhost:8881/
Which returns a json with all known files and dirs in the data folder. This list includes the uploaded files
as well as uploaded tags. The tags are named
<PACKAGE_NAME>@<TAG> and contain the name of the file it points to.