From 22a14fb52d5079f3d7ba315d3ad8ed084759361b Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Wed, 30 Mar 2022 00:17:58 +0400
Subject: [PATCH] Fixed documentation. (#69)

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 docs/configuration.md | 40 +++++++++++++++-----------------
 docs/deploy.md        | 54 ++++++++++++++++++++++++-------------------
 docs/index.md         | 39 ++++++++++++++++---------------
 3 files changed, 70 insertions(+), 63 deletions(-)

diff --git a/docs/configuration.md b/docs/configuration.md
index 5e6f7f7..9f7bf21 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -3,13 +3,12 @@ title: Configuration
 description: "How to configure Rusts"
 ---
 
-Rustus is highly configurable you can configure rustus with CLI or you can use environment variables.
+Rustus is highly configurable. You can adjust it with CLI or you can use environment variables.
 
-!!! info
+!!! warning
     Some options can be passed only through as CLI parameters
 
 !!! info
-
     Information about hooks you can find on [Hooks page](../hooks).
 
 
@@ -126,7 +125,7 @@ about it requested from storage to get actual path of an upload.
 Available info storages:
 
 * `file-info-storage` - stores information in files on disk;
-* `redis-info-storage` - information is stored in redis;
+* `redis-info-storage` - information is stored in Redis;
 * `db-info-storage` - information is stored in database;
 
 ### File info storage
@@ -142,8 +141,7 @@ storing information about uploads. But if you don't plan to have many uploads, i
 === "CLI"
 
     ``` bash
-    rustus --force-fsync \
-        --storage "file-info-storage" \
+    rustus --info-storage "file-info-storage" \
         --info-dir "./data"
     ```
 
@@ -162,18 +160,17 @@ Redis db is a good way to store information.
 
 !!! note
 
-    If you're using redis as a cluster
-    you must provide connection string for master redis server.
+    If you're using Redis as a cluster
+    you must provide connection string for master Redis server.
     Since rustus need to have latest information and it writes a lot.
 
-`--info-db-dsn` - connection string for your redis database.
-It's required if redis-info-storage is chosen.
+`--info-db-dsn` - connection string for your Redis database.
+It's required if `redis-info-storage` is chosen.
 
 === "CLI"
 
     ``` bash
-    rustus --force-fsync \
-        --storage "redis-info-storage" \
+    rustus --info-storage "redis-info-storage" \
         --info-db-dsn "redis://localhost/0"
     ```
 
@@ -189,10 +186,10 @@ It's required if redis-info-storage is chosen.
 
 ### DB info storage
 
-Rustus can store information about upload in database.
+Rustus can store information about upload in a database.
 
-It's a good and reliable option. But rustus can't work
-with replicas since it requires most recent information
+It's a good and reliable option. But Rustus can't work
+with replicas, since it requires the most recent information
 about uploads.
 
 You can use `postgresql`, `mysql` or even `sqlite` schemas to
@@ -203,8 +200,7 @@ connect to database.
 === "CLI"
 
     ``` bash
-    rustus --force-fsync \
-        --storage "db-info-storage" \
+    rustus --info-storage "db-info-storage" \
         --info-db-dsn "postgresql://user:password@localhost/db"
     ```
 
@@ -219,11 +215,11 @@ connect to database.
 
 ## Configuring TUS
 
-Since tus protocol offers extensibility you can turn off some protocol extensions.
+Since TUS protocol offers extensibility you can turn off some protocol extensions.
 
 Available extensions:
 
-* `getting` - rustus specific extension that helps you download uploaded files with get request;
+* `getting` - Rustus specific extension that helps you download uploaded files with get request;
 * `creation` - helps you to create files (It's like a core feature you better have this enabled);
 * `termination` - allows you to delete uploads with DELETE request;
 * `creation-with-upload` - allows you to write first bytes of a file while creating;
@@ -234,13 +230,15 @@ Available extensions:
 You can read more about extensions on [official web-site](https://tus.io/protocols/resumable-upload.html#protocol-extensions).
 
 `--tus-extensions` - a list of enabled extensions.
+`--remove-parts` - remove parts files after successfull concatentation (disabled by default).
 
 By default all extensions are enabled.
 
 === "CLI"
 
     ``` bash
-    rustus --tus-extensions "getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum"
+    rustus --remove-parts \
+        --tus-extensions "getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum"
     ```
 
 === "ENV"
@@ -248,5 +246,5 @@ By default all extensions are enabled.
     ``` bash
     export RUSTUS_TUS_EXTENSIONS="getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum"
 
-    rustus
+    rustus --remove-parts
     ```
diff --git a/docs/deploy.md b/docs/deploy.md
index 2d180e0..2583bf2 100644
--- a/docs/deploy.md
+++ b/docs/deploy.md
@@ -6,8 +6,8 @@ description: "How to deploy rustus"
 # Deployment
 
 Deploying an application is always a challenge. Rustus was made to make deployment as easy as possible.
-Since this application works with files so if you want to scale number of rustus instances you
-have to somehow make different rustus instances to work with the same data or info directory.
+Since Rustus works with files you have to be careful while scaling it. All rustus instances
+must have access to the same data and info storages.
 
 ## Docker compose
 
@@ -69,7 +69,7 @@ volumes:
 The main idea is that traffic that comes into nginx-proxy
 is routed in one of multiple rustus containers.
 Here I used `jwilder/nginx-proxy` but you can use other
-reverse-proxies such as raw `nginx proxy` or `traefik`.
+reverse-proxies such as [Nginx proxy](https://www.nginx.com/), [Traefik](https://traefik.io/) or [Envoy proxy](https://www.envoyproxy.io/).
 
 Now you can run multiple rustus instnaces like this.
 
@@ -81,11 +81,11 @@ After that you can upload files to `http://localhost:8080/files`
 
 ## Kubernetes
 
-Configuration for kubernetes is almost the same as docker.
+Configuration for Kubernetes is almost the same as for Docker.
 But the most preferable way is an official helm chart.
 
-Load balancing is done by kubernetes so you just have to
-create volume to mount data and info directories.
+Load balancing is done by Kubernetes, so you just have to
+create a volume to mount data and info directories.
 
 ## Helm
 
@@ -93,19 +93,23 @@ You can install rustus by running this set of commands:
 ``` bash
 helm repo add "rustus" "https://s3rius.github.io/rustus/helm_releases"
 helm repo update
-helm repo install "rustus/rustus"
+helm install "rustus" "rustus/rustus"
 ```
 
 ### Configuration
-But of course it can be configured.
+
+Since default deplyment may not fit you.
+You can adjust it to satisfy your needs.
+You can do it easily with helm.
+
+
+At first you need to save default values on disk.
 
 ``` bash
 # You can download basic configuration by running
 helm show values "rustus/rustus" > values.yml
 ```
 
-By editing values.yml you can configure many different options.
-
 !!! warning
 
     For production use you must provide and mount PersistentVolumeClaim
@@ -113,9 +117,24 @@ By editing values.yml you can configure many different options.
 
     This helm chart has only one replica by default.
 
+You can read more about configuration below.
+
+After you done editing `values.yml`, you can apply the configuration like this:
+
+``` bash
+helm upgrade \
+--install \ # Install chart if it's not installed
+--namespace rustus \ # k8s namespace
+--create-namespace \ # Creates namespace if it doesn't exist
+--atomic \ # Ensures that everything is deployed correctly
+--values "values.yml" \ # Link to values.yml file
+"rustus" \ # name of a release
+"rustus/rustus" # Name of the chart
+```
+
 ### Persistence
 
-You can add pvc mount by editing `persistence` section.
+You can add PVC mount by editing `persistence` section.
 The most preferable way is to create `PersistentVolume` and `PersistentVolumeClaim`
 before installing this chart.
 
@@ -156,16 +175,3 @@ You can find information about configuration these subcharts here:
 * [Repo](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) for postgresql.
 
 In production you may ignore these subcharts to deploy your own redis or mysql or postgresql.
-
-After you done editing `values.yml` you can apply the configuration like this:
-
-``` bash
-helm upgrade \
---install \ # Install chart if it's not installed
---namespace rustus \ # k8s namespace
---create-namespace \ # Creates namespace if it doesn't exist
---atomic \ # Ensures that everything is deployed correctly
---values "values.yml" \ # Link to values.yml file
-"rustus" \ # name of a release
-"rustus/rustus" # Name of the chart
-```
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index eacebf7..ad36757 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -15,12 +15,12 @@ description: Rustus docs
 
 Rustus is a [TUS](https://tus.io) protocol implementation that helps you handle file uploads.
 
-This project has many features that makes it easy to integrate in your service.
+This project has many features that makes it easy to integrate with your application.
 
 
 ## Installation
 
-You can install rustus by 4 different ways.
+You can install rustus in four different ways.
 
 ### From source
 
@@ -32,22 +32,23 @@ git clone https://github.com/s3rius/rustus.git
 cd rustus
 cargo install --path . --features=all
 ```
-Also you can speedup build by disabling some features.
+
+Also, you can speedup build by disabling some features.
 
 Available features:
 
-* `amqp_notifier` - adds amqp protocol support for notifying about upload status;
-* `db_info_storage` - adds support for storing information about upload in different databases (Postgres, MySQL, SQLite);
-* `http_notifier` - adds support for notifying about upload status via http protocol;
-* `redis_info_storage` - adds support for storing information about upload in redis database;
+* `amqp_notifier` - adds `AMQP` protocol support for notifying about upload status;
+* `db_info_storage` - adds support for storing information about upload in different databases (`Postgres`, `MySQL`, `SQLite`);
+* `http_notifier` - adds support for notifying about upload status via `HTTP` protocol;
+* `redis_info_storage` - adds support for storing information about upload in `Redis` database;
 * `hashers` - adds support for checksum verification;
-* `all` - enables all rustus features.
+* `all` - enables all Rustus features.
 
 All precompiled binaries have all features enabled.
 
 ### With cargo
 
-If you have cargo installed maybe it would be easier to
+If you have cargo installed, it might be easier to
 install it directly from crates.io.
 
 ```bash
@@ -56,27 +57,29 @@ cargo install rustus --features=all
 
 ### Binaries
 
-All precompiled binaries available on github releases page.
+All precompiled binaries available on Github releases page.
 You can download binaries from [here](https://github.com/s3rius/rustus/releases), unpack it and run.
 
 ```bash
 ./rustus
 ```
 
-Make sure that you download version for your cpu and os.
+Make sure you download right version for your CPU architecture and OS.
 
-### Using docker
+### Using Docker
 
-One of the most simple ways to run rustus is docker.
+One of the most simple ways to run rustus is `Docker`.
 
 Rustus has two containers for each version.
-1. debian based image
-2. alpine based image
+1. Debian based image
+2. Alpine based image
 
-Alpine based images are more lightweight than debian
+Alpine based images are more lightweight than Debian
 
-To run rustus you just need to run this command
+To run Rustus with Docker you just need to run this command
 
 ```bash
 docker run --rm -p "1081:1081" -d s3rius/rustus --log-level "DEBUG"
-```
\ No newline at end of file
+```
+
+More information about Rustus docker images you can find on [Docker hub page](https://hub.docker.com/r/s3rius/rustus/).
\ No newline at end of file
-- 
GitLab