|
10 | 10 |
|
11 | 11 | You can clone the repository and copy the `/kubernetes` directory into another directory of your choice.
|
12 | 12 |
|
13 |
| -### 2. Populate the environment variables |
| 13 | +### 2. Populate the environment variables and secrets |
14 | 14 |
|
15 |
| -To configure the app, edit the configuration in `.env`. |
| 15 | +To configure the app, copy the `.env_sample` to `.env` and change to your specific needs. |
16 | 16 |
|
17 |
| - |
18 |
| -You **should** change the random strings. You can use `openssl rand -base64 36` to generate the random strings. You should also change the `NEXTAUTH_URL` variable to point to your server address. |
| 17 | +You should also change the `NEXTAUTH_URL` variable to point to your server address. |
19 | 18 |
|
20 | 19 | Using `HOARDER_VERSION=release` will pull the latest stable version. You might want to pin the version instead to control the upgrades (e.g. `HOARDER_VERSION=0.10.0`). Check the latest versions [here](https://github.com/hoarder-app/hoarder/pkgs/container/hoarder-web).
|
21 | 20 |
|
| 21 | +To see all available configuration options check the [documentation](https://docs.hoarder.app/configuration). |
| 22 | + |
| 23 | +To configure the neccessary secrets for the application copy the `.secrets_sample` file to `.secrets` and change the sample secrets to your generated secrets. |
| 24 | + |
| 25 | +> Note: You **should** change the random strings. You can use `openssl rand -base64 36` to generate the random strings. |
| 26 | +
|
22 | 27 | ### 3. Setup OpenAI
|
23 | 28 |
|
24 | 29 | To enable automatic tagging, you'll need to configure OpenAI. This is optional though but highly recommended.
|
@@ -56,16 +61,52 @@ make deploy
|
56 | 61 |
|
57 | 62 | ### 5. Access the service
|
58 | 63 |
|
| 64 | +#### via LoadBalancer IP |
| 65 | + |
59 | 66 | By default, these manifests expose the application as a LoadBalancer Service. You can run `kubectl get services` to identify the IP of the loadbalancer for your service.
|
60 | 67 |
|
61 | 68 | Then visit `http://<loadbalancer-ip>:3000` and you should be greated with the Sign In page.
|
62 | 69 |
|
63 | 70 | > Note: Depending on your setup you might want to expose the service via an Ingress, or have a different means to access it.
|
64 | 71 |
|
| 72 | +#### Via Ingress |
| 73 | + |
| 74 | +If you want to use an ingress, you can customize the sample ingress in the kubernetes folder and change the host to the DNS name of your choice. |
| 75 | + |
| 76 | +After that you have to configure the web service to the type ClusterIP so it is only reachable via the ingress. |
| 77 | + |
| 78 | +If you have already deployed the service you can patch the web service to the type ClusterIP with the following command: |
| 79 | + |
| 80 | +` kubectl -n hoarder patch service web -p '{"spec":{"type":"ClusterIP"}}' ` |
| 81 | + |
| 82 | +Afterwards you can apply the ingress and access the service via your chosen URL. |
| 83 | + |
| 84 | +#### Setting up HTTPS access to the Service |
| 85 | + |
| 86 | +To access hoarder securely you can configure the ingress to use a preconfigured TLS certificate. This requires that you already have the needed files, namely your .crt and .key file, on hand. |
| 87 | + |
| 88 | +After you have deployed the hoarder manifests you can deploy your certificate for hoarder in the `hoarder` namespace with this example command. You can name the secret however you want. But be aware that the secret name in the ingress definition has to match the secret name. |
| 89 | + |
| 90 | +` $ kubectl --namespace hoarder create secret tls hoarder-web-tls --cert=/path/to/crt --key=/path/to/key ` |
| 91 | + |
| 92 | +If the secret is successfully created you can now configure the Ingress to use TLS via this changes to the spec: |
| 93 | + |
| 94 | +```` yaml |
| 95 | + spec: |
| 96 | + tls: |
| 97 | + - hosts: |
| 98 | + - hoarder.example.com |
| 99 | + secretName: hoarder-web-tls |
| 100 | +```` |
| 101 | + |
| 102 | +> Note: Be aware that the hosts have to match between the tls spec and the HTTP spec. |
| 103 | + |
65 | 104 | ### [Optional] 6. Setup quick sharing extensions
|
66 | 105 |
|
67 | 106 | Go to the [quick sharing page](/quick-sharing) to install the mobile apps and the browser extensions. Those will help you hoard things faster!
|
68 | 107 |
|
69 | 108 | ## Updating
|
70 | 109 |
|
71 | 110 | Edit the `HOARDER_VERSION` variable in the `kustomization.yaml` file and run `make clean deploy`.
|
| 111 | + |
| 112 | +If you have chosen `release` as the image tag you can also destroy the web pod, since the deployment has an ImagePullPolicy set to always the pod always pulls the image from the registry, this way we can ensure that the newest release image is pulled. |
0 commit comments