Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate secret function and replaced few instances #7810

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -271,7 +268,7 @@ resource "azapi_update_resource" "cors" {
```hcl
# backend.tf

# Create a random UUIDs
# Create app random UUID
Khaan25 marked this conversation as resolved.
Show resolved Hide resolved
resource "random_uuid" "app_secret" {}

resource "azurerm_container_app" "twenty_server" {
Expand Down Expand Up @@ -335,10 +332,6 @@ resource "azurerm_container_app" "twenty_server" {
value = "postgres://${local.db_user}:
${local.db_password}@${local.db_app_name}:5432/default"
}
env {
Khaan25 marked this conversation as resolved.
Show resolved Hide resolved
name = "FRONT_BASE_URL"
value = "https://${local.front_app_name}"
}
env {
name = "APP_SECRET"
value = random_uuid.app_secret.result
Expand Down Expand Up @@ -431,4 +424,4 @@ resource "azurerm_container_app" "twenty_db" {

Please feel free to Open a PR to add more Cloud Provider options.

<ArticleEditContent></ArticleEditContent>
<ArticleEditContent></ArticleEditContent>
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ Follow these steps for a manual setup.

2. **Generate Secret Tokens**

Run the following command to generate a unique random strings:
Run the following command to generate a unique random string:
```bash
openssl rand -base64 32
```
**Important:** Keep this value secret / do not share it.

3. **Update the `.env`**

Replace the placeholder values in your .env file with the generated token:
Replace the placeholder value in your .env file with the generated token:

```ini
APP_SECRET=first_random_string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ yarn command:prod cron:calendar:calendar-event-list-fetch
### Tokens

<ArticleTable options={[
['APP_SECRET', '<random>', 'Secret used for encryption across the app'],
['APP_SECRET', '<random>', 'Secret used for the app token'],
Khaan25 marked this conversation as resolved.
Show resolved Hide resolved
['ACCESS_TOKEN_EXPIRES_IN', '30m', 'Access token expiration time'],
['LOGIN_TOKEN_EXPIRES_IN', '15m', 'Login token expiration time'],
['REFRESH_TOKEN_EXPIRES_IN', '90d', 'Refresh token expiration time'],
Expand Down
Loading