feat: generate secret function and replaced few instances (#7810)

This PR fixes #4588

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
ZiaCodes
2024-10-30 16:07:11 +05:00
committed by GitHub
parent 1782865ff8
commit 57d9b8e8b4
75 changed files with 2860 additions and 1531 deletions

View File

@ -5,10 +5,9 @@ image: /images/user-guide/notes/notes_header.png
---
<ArticleWarning>
This document is maintained by the community. It might contain issues.
This document is maintained by the community. It might contain issues.
</ArticleWarning>
## Kubernetes via Terraform and Manifests
Community-led documentation for Kubernetes deployment is available [here](https://github.com/twentyhq/twenty/tree/main/packages/twenty-docker/k8s)
@ -19,14 +18,12 @@ Community-led, might not be up to date
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/twentyhq/twenty)
## RepoCloud
## RepoCloud
Community-led, might not be up to date
[![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=259)
## Azure Container Apps
Community-led, might not be up to date
@ -271,11 +268,8 @@ resource "azapi_update_resource" "cors" {
```hcl
# backend.tf
# Create three random UUIDs
resource "random_uuid" "access_token_secret" {}
resource "random_uuid" "login_token_secret" {}
resource "random_uuid" "refresh_token_secret" {}
resource "random_uuid" "file_token_secret" {}
# Create a random UUID
resource "random_uuid" "app_secret" {}
resource "azurerm_container_app" "twenty_server" {
name = local.server_name
@ -343,20 +337,8 @@ resource "azurerm_container_app" "twenty_server" {
value = "https://${local.front_app_name}"
}
env {
name = "ACCESS_TOKEN_SECRET"
value = random_uuid.access_token_secret.result
}
env {
name = "LOGIN_TOKEN_SECRET"
value = random_uuid.login_token_secret.result
}
env {
name = "REFRESH_TOKEN_SECRET"
value = random_uuid.refresh_token_secret.result
}
env {
name = "FILE_TOKEN_SECRET"
value = random_uuid.file_token_secret.result
name = "APP_SECRET"
value = random_uuid.app_secret.result
}
}
}
@ -446,4 +428,4 @@ resource "azurerm_container_app" "twenty_db" {
Please feel free to Open a PR to add more Cloud Provider options.
<ArticleEditContent></ArticleEditContent>
<ArticleEditContent></ArticleEditContent>