|
@@ -3,59 +3,53 @@
|
|
|
Development
|
|
|
-----------
|
|
|
|
|
|
-Run a development server:
|
|
|
+Run a development server (an ipfs node and development chain should be running on the local machine)
|
|
|
|
|
|
```bash
|
|
|
-$ yarn run dev --config myconfig.json
|
|
|
+$ yarn colossus --dev
|
|
|
```
|
|
|
|
|
|
-Command-Line
|
|
|
-------------
|
|
|
+This will expect the chain to be configured with certain development accounts.
|
|
|
+The setup can be done by running the dev-init command for the storage-cli:
|
|
|
|
|
|
-Running a storage server is (almost) as easy as running the bundled `colossus`
|
|
|
-executable:
|
|
|
-
|
|
|
-```bash
|
|
|
-$ colossus --storage=/path/to/storage/directory
|
|
|
+```sh
|
|
|
+yarn storage-cli dev-init
|
|
|
```
|
|
|
|
|
|
-Run with `--help` to see a list of available CLI options.
|
|
|
-
|
|
|
-You need to stake as a storage provider to run a storage node.
|
|
|
-
|
|
|
-Configuration
|
|
|
--------------
|
|
|
-
|
|
|
-Most common configuration options are available as command-line options
|
|
|
-for the CLI.
|
|
|
|
|
|
-However, some advanced configuration options are only possible to set
|
|
|
-via the configuration file.
|
|
|
-
|
|
|
-* `filter` is a hash of upload filtering options.
|
|
|
- * `max_size` sets the maximum permissible file upload size. If unset,
|
|
|
- this defaults to 100 MiB.
|
|
|
- * `mime` is a hash of...
|
|
|
- * `accept` is an Array of mime types that are acceptable for uploads,
|
|
|
- such as `text/plain`, etc. Mime types can also be specified for
|
|
|
- wildcard matching, such as `video/*`.
|
|
|
- * `reject` is an Array of mime types that are unacceptable for uploads.
|
|
|
-
|
|
|
-Upload Filtering
|
|
|
-----------------
|
|
|
+Command-Line
|
|
|
+------------
|
|
|
|
|
|
-The upload filtering logic first tests whether any of the `accept` mime types
|
|
|
-are matched. If none are matched, the upload is rejected. If any is matched,
|
|
|
-then the upload is still rejected if any of the `reject` mime types are
|
|
|
-matched.
|
|
|
+```sh
|
|
|
+$ yarn colossus --help
|
|
|
+```
|
|
|
|
|
|
-This allows inclusive and exclusive filtering.
|
|
|
+```
|
|
|
+ Colossus - Joystream Storage Node
|
|
|
+
|
|
|
+ Usage:
|
|
|
+ $ colossus [command] [arguments]
|
|
|
+
|
|
|
+ Commands:
|
|
|
+ server Runs a production server instance. (discovery and storage services)
|
|
|
+ This is the default command if not specified.
|
|
|
+ discovery Run the discovery service only.
|
|
|
+
|
|
|
+ Arguments (required for server. Ignored if running server with --dev option):
|
|
|
+ --provider-id ID, -i ID StorageProviderId assigned to you in working group.
|
|
|
+ --key-file FILE JSON key export file to use as the storage provider (role account).
|
|
|
+ --public-url=URL, -u URL API Public URL to announce.
|
|
|
+
|
|
|
+ Arguments (optional):
|
|
|
+ --dev Runs server with developer settings.
|
|
|
+ --passphrase Optional passphrase to use to decrypt the key-file.
|
|
|
+ --port=PORT, -p PORT Port number to listen on, defaults to 3000.
|
|
|
+ --ws-provider WS_URL Joystream-node websocket provider, defaults to ws://localhost:9944
|
|
|
+```
|
|
|
|
|
|
-* `{ accept: ['text/plain', 'text/html'] }` accepts *only* the two given mime types.
|
|
|
-* `{ accept: ['text/*'], reject: ['text/plain'] }` accepts any `text/*` that is not
|
|
|
- `text/plain`.
|
|
|
+To run a storage server in production you will need to enroll on the network first to
|
|
|
+obtain your provider-id and role account.
|
|
|
|
|
|
-More advanced filtering is currently not available.
|
|
|
|
|
|
API Packages
|
|
|
------------
|
|
@@ -78,7 +72,7 @@ For reusability across API versions, it's best to keep files in the `paths`
|
|
|
subfolder very thin, and instead inject implementations via the `dependencies`
|
|
|
configuration value of `express-openapi`.
|
|
|
|
|
|
-These implementations line to the `./lib` subfolder. Adjust `server.js` as
|
|
|
+These implementations line to the `./lib` subfolder. Adjust `app.js` as
|
|
|
needed to make them available to API packages.
|
|
|
|
|
|
Streaming Notes
|