chore: Upgrade helm chart (#4808)

This commit is contained in:
Dhruwang Jariwala
2025-02-28 17:21:58 +05:30
committed by GitHub
parent f9ed0c487f
commit 1eb8049d04
6 changed files with 87 additions and 102 deletions

View File

@@ -1,17 +0,0 @@
"use client";
import { useTranslate } from "@tolgee/react";
import { XCircleIcon } from "lucide-react";
const Error = ({ error }: { error: Error & { digest?: string } }) => {
const { t } = useTranslate();
return (
<div className="mx-auto flex h-full max-w-xl flex-col items-center justify-center text-center">
<XCircleIcon height={40} color="red" />
<p className="text-md mt-4 font-bold text-zinc-900">{t("health.degraded")}</p>
<p className="text-sm text-zinc-900">{error.message}</p>
</div>
);
};
export default Error;

View File

@@ -1,54 +0,0 @@
import { getTranslate } from "@/tolgee/server";
import { BadgeCheckIcon } from "lucide-react";
import { Metadata } from "next";
import { prisma } from "@formbricks/database";
export const dynamic = "force-dynamic"; // no caching
export const metadata: Metadata = {
robots: {
index: false,
follow: false,
googleBot: {
index: false,
follow: false,
},
},
};
const checkDatabaseConnection = async () => {
try {
await prisma.$queryRaw`SELECT 1`;
} catch (e) {
console.error("Database connection error:", e);
throw new Error("Database could not be reached");
}
};
/* const checkS3Connection = async () => {
if (!IS_S3_CONFIGURED) {
// dont try connecting if not in use
return;
}
try {
await testS3BucketAccess();
} catch (e) {
throw new Error("S3 Bucket cannot be accessed");
}
}; */
const Page = async () => {
const t = await getTranslate();
await checkDatabaseConnection();
// Skipping S3 check for now until it's fixed
// await checkS3Connection();
return (
<div className="mx-auto flex h-full max-w-xl flex-col items-center justify-center text-center">
<BadgeCheckIcon height={40} color="green" />
<p className="text-md mt-4 font-bold text-zinc-900">{t("health.healthy")}</p>
</div>
);
};
export default Page;

View File

@@ -0,0 +1,3 @@
export async function GET() {
return Response.json({ status: "ok" });
}

View File

@@ -2,7 +2,7 @@ apiVersion: v2
name: formbricks
description: A Helm chart for Formbricks with PostgreSQL, Redis, Traefik, and cert-manager
type: application
version: 0.1.1
version: 0.1.2
appVersion: "1.0.0"
dependencies:
- name: postgresql

View File

@@ -78,20 +78,49 @@ This Helm chart deploys the following components:
To quickly deploy Formbricks with default settings:
1. Add the Formbricks Helm repository:
1. clone the formbricks repository and navigate to the helm-chart directory:
```bash
helm repo add formbricks https://charts.formbricks.com
helm repo update
git clone https://github.com/formbricks/formbricks.git
cd formbricks/helm-chart
```
2. Install the chart:
2. Deploy Formbricks
```bash
helm install my-formbricks formbricks/formbricks --namespace formbricks --create-namespace --set postgresql.enabled=true
helm install my-formbricks ./ \
--namespace formbricks \
--create-namespace \
--set replicaCount=2
```
This will deploy Formbricks with default settings, including a new PostgreSQL instance, Redis and Traefik disabled.
### Verify and Access Formbricks
After deploying Formbricks, you can verify the installation and access the application:
1. Check the Running Services:
```bash
kubectl get pods -n formbricks
kubectl get svc -n formbricks
kubectl get ingress -n formbricks
```
> **Note:** The Formbricks application pod may take some time to reach a stable state as it runs database migrations during startup.
2. Access Formbricks:
- If running locally with **Minikube**:
```bash
minikube service my-formbricks -n formbricks
```
- If deployed on a **cloud cluster**, visit:
```
https://formbricks.example.com
```
(Replace with your configured hostname)
### Usage Examples
Here are various examples of how to install and configure the Formbricks Helm chart:
@@ -110,41 +139,43 @@ Here are various examples of how to install and configure the Formbricks Helm ch
--set hostname=forms.example.com
```
This command enables Traefik and sets a custom hostname. Replace `forms.example.com` with your actual domain name.
````
This command enables Traefik and sets a custom hostname. Replace `forms.example.com` with your actual domain name.
</details>
<details>
<summary>Option 2: Installation with SSL (Recommended for production)</summary>
1. First, download the values file:
1. First, download the values file:
```bash
helm show values formbricks/formbricks > values.yaml
```
```bash
helm show values formbricks/formbricks > values.yaml
```
2. Open the `values.yaml` file in a text editor and make the following changes:
2. Open the `values.yaml` file in a text editor and make the following changes:
```yaml
traefik:
enabled: true
additionalArguments:
- "--certificatesresolvers.letsencrypt.acme.email=your-email@example.com"
```
```yaml
traefik:
enabled: true
additionalArguments:
- "--certificatesresolvers.letsencrypt.acme.email=your-email@example.com"
```
Replace `your-email@example.com` with a valid email address where you want to receive Let's Encrypt notifications.
Replace `your-email@example.com` with a valid email address where you want to receive Let's Encrypt notifications.
3. Install Formbricks with the updated values file:
3. Install Formbricks with the updated values file:
```bash
helm install my-formbricks formbricks/formbricks \
-f values.yaml \
--namespace formbricks \
--create-namespace \
--set hostname=forms.example.com
```
```bash
helm install my-formbricks formbricks/formbricks \
-f values.yaml \
--namespace formbricks \
--create-namespace \
--set hostname=forms.example.com
```
This command enables Traefik, sets a custom hostname, and uses the configured email address for Let's Encrypt. Remember to replace `forms.example.com` with your actual domain name.
This command enables Traefik, sets a custom hostname, and uses the configured email address for Let's Encrypt. Remember to replace `forms.example.com` with your actual domain name.
</details>
@@ -671,3 +702,5 @@ Please check out [our contribution guide](https://formbricks.com/docs/developer-
For more detailed information on MicroK8s, including advanced configuration and usage, please refer to the [official MicroK8s documentation](https://microk8s.io/docs).
For Formbricks Helm chart configuration options, see the [Configuration](#configuration) and [Full Values Documentation](#full-values-documentation) sections of this document.
```
````

View File

@@ -1,7 +1,7 @@
image:
repository: ghcr.io/formbricks/formbricks
pullPolicy: IfNotPresent
tag: v2.6.0
tag: v3.2.0
service:
type: ClusterIP
@@ -44,6 +44,16 @@ autoscaling:
replicaCount: 1
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
formbricksConfig:
nextAuthSecret: ""
encryptionKey: ""
@@ -125,7 +135,9 @@ redis:
postgresql:
enabled: true
externalUrl: ""
image:
repository: pgvector/pgvector
tag: 0.8.0-pg17
auth:
username: formbricks
password: formbrickspassword
@@ -133,4 +145,12 @@ postgresql:
primary:
persistence:
enabled: true
size: 10Gi
size: 10Gi
podSecurityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
containerSecurityContext:
enabled: true
runAsUser: 1001
readOnlyRootFilesystem: false