Skip to content

Commit

Permalink
Update chart to work with app v0.33.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed Dec 9, 2024
1 parent 33bdd96 commit 66f2df7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'charts/**'

permissions:
contents: read
contents: write
pages: write
id-token: write

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TwentyCRM helm chart


This repository provides a helm chart to deploy TwentyCRM.
This repository provides a helm chart to deploy [TwentyCRM](https://twenty.com/).

## Install

Expand All @@ -20,7 +20,8 @@ For a complete list of configuration fields please check [values.yaml](./values.
| Field Name | Description | Default Value |
|----------------------------------|-------------------------------------------------------------------------------------------|-------------------------|
| `image` | Docker image for the application. | `twentycrm/twenty:latest` |
| `env` | List of environment variables for configuring the application. | `[]` |
| `env` | [List of environment variables](https://twenty.com/developers/section/self-hosting/self-hosting-var) for configuring the application.| `{}`|
| `secrets.appSecret` | Secret used for encryption across the app. | |
| `secrets.accessToken` | Access token for authentication. | |
| `secrets.loginToken` | Login token for authentication. | |
| `secrets.refreshToken` | Refresh token for authentication. | |
Expand Down
7 changes: 7 additions & 0 deletions charts/twentycrm/templates/deployment-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
imagePullPolicy: Always
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-app-secrets
key: PG_PASSWORD

- name: POSTGRESQL_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-app-secrets
Expand All @@ -55,6 +61,7 @@ spec:

- name: BITNAMI_DEBUG
value: "true"

ports:
- containerPort: 5432
name: tcp
Expand Down
6 changes: 1 addition & 5 deletions charts/twentycrm/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ spec:
value: "https://{{ .Values.ingress.host }}"
- name: ENABLE_DB_MIGRATIONS
value: "true"
- name: SIGN_IN_PREFILLED
value: "true"
- name: STORAGE_TYPE
value: "local"
- name: "MESSAGE_QUEUE_TYPE"
value: "pg-boss"
value: "bull-mq"

ports:
- containerPort: 3000
Expand Down
1 change: 1 addition & 0 deletions charts/twentycrm/templates/secret-tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ data:
LOGIN_TOKEN_SECRET: {{ default (randAlphaNum 32) .Values.secrets.loginToken | b64enc | quote }}
REFRESH_TOKEN_SECRET: {{ default (randAlphaNum 32) .Values.secrets.refreshToken | b64enc | quote }}
FILE_TOKEN_SECRET: {{ default (randAlphaNum 32) .Values.secrets.fileToken | b64enc | quote }}
APP_SECRET: {{ default (randAlphaNum 32) .Values.secrets.appSecret | b64enc | quote }}

6 changes: 4 additions & 2 deletions charts/twentycrm/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ type: Opaque
data:
PG_DATABASE: {{ .Values.db.database | b64enc | quote }}
PG_USER: {{ .Values.db.user | b64enc | quote }}
PG_PASSWORD: {{ .Values.db.password | b64enc | quote }}
PG_ADMIN_PASSWORD: {{ required ".db.adminPassword is missing" .Values.db.password | b64enc | quote }}
PG_DATABASE_URL: {{ printf "postgres://%s:%s@%s-db/twenty" .Values.db.user .Values.db.password .Release.Name | b64enc | quote}}
PG_DATABASE_URL: {{ printf "postgres://%s:%s@%s-db:5432/twenty" .Values.db.user .Values.db.password .Release.Name | b64enc | quote}}

REDIS_HOST: {{ printf "%s-redis" .Release.Name |b64enc | quote}}
REDIS_HOST: {{ printf "%s-redis" .Release.Name | b64enc | quote}}
REDIS_URL: {{ printf "redis://%s-redis:6379/0" .Release.Name | b64enc | quote}}

{{- range $key, $value := .Values.env }}
{{ $key }}: {{ printf "%s" $value | b64enc | quote }}
Expand Down
17 changes: 11 additions & 6 deletions charts/twentycrm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ image: twentycrm/twenty:latest

# A list of env that can be set:
# https://twenty.com/developers/section/self-hosting/self-hosting-var
env: []
env:
STORAGE_TYPE: "local"
SIGN_IN_PREFILLED: "false"
ACCESS_TOKEN_EXPIRES_IN: 7d
LOGIN_TOKEN_EXPIRES_IN: 1h
#IS_SIGN_UP_DISABLED: "true"

secrets:
accessToken:
loginToken:
refreshToken:
fileToken:

# appToken:
# accessToken:
# loginToken:
# refreshToken:
# fileToken:


server:
Expand Down

0 comments on commit 66f2df7

Please sign in to comment.