From da5385d8895c426047a4966a345f23090bccddd8 Mon Sep 17 00:00:00 2001
From: Syrine Neifar <syrine@greenhost.nl>
Date: Thu, 20 Oct 2022 09:33:04 +0000
Subject: [PATCH] doc update: add a section for installing the chart from a
 local repo

---
 README.md | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 696bbe5d..a33fcf07 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ chart](https://github.com/helm/charts/tree/master/stable/collabora-code)
 ## Installation
 
 **NOTE:** The `onlyoffice.server_name` variable needs to be
-overwritten with an URL that points to your onlyoffice for this to work
+overwritten with a URL that points to your onlyoffice for this to work
 correctly. See `values-local.yaml.example` for an example of domain
 configurations you might want to do. These instructions assume you copy
 `values-local.yaml.example` to `values-local.yaml` and edit it.
@@ -28,12 +28,40 @@ secrets variables manually when you run helm install:
 - `onlyoffice.database.password`
 - `rabbitmq.rabbitmq.password`
 
+### Install from the remote repo
+
+This is the way to go if you want to use the packaged chart as is. If you'd like to make changes before installing, refer to the next section.
+
 Add our helm repository[^1]:
 
 ```console
 helm repo add nextcloud-onlyoffice https://open.greenhost.net/api/v4/projects/1/packages/helm/stable
 ```
 
+Then install the chart:
+
+```console
+helm install --wait -f values-local.yaml my-nextcloud nextcloud-onlyoffice/nextcloud-onlyoffice
+```
+
+**The `--wait` is important!** We need that because of how [helm chart
+hooks](https://helm.sh/docs/topics/charts_hooks/) work:
+
+> Note that if the --wait flag is set, the library will wait until all resources
+> are in a ready state and will not run the post-install hook until they are
+> ready.
+
+The job in this chart needs the Nextcloud pod to be in a ready state before
+being executed.
+
+### Install from a local repo
+
+Start by cloning the nextcloud helm chart repo:
+
+```console
+git clone https://open.greenhost.net/stackspin/nextcloud.git
+```
+
 Add the dependencies repositories:
 ```console
 # nextcloud chart
@@ -48,9 +76,8 @@ helm dependency build
 ```
 
 Then install the chart:
-
 ```console
-helm install --wait -f values-local.yaml my-nextcloud nextcloud-onlyoffice/nextcloud-onlyoffice
+helm install --wait -f values-local.yaml my-nextcloud ./nextcloud
 ```
 
 **The `--wait` is important!** We need that because of how [helm chart
-- 
GitLab