i18n - docs translations (#17434)
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
This commit is contained in:
committed by
GitHub
parent
2353bc62cc
commit
e0d4492013
@@ -1,253 +1,253 @@
|
||||
---
|
||||
title: 1-Click w/ Docker Compose
|
||||
title: 1-Clique c/ Docker Compose
|
||||
---
|
||||
|
||||
<Warning>
|
||||
Docker containers are for production hosting or self-hosting, for the contribution please check the [Local Setup](/l/pt/developers/contribute/capabilities/local-setup).
|
||||
Contêineres Docker são para hospedagem de produção ou auto-hospedagem, para contribuições, por favor, verifique o [Setup Local](/l/pt/developers/contribute/capabilities/local-setup).
|
||||
</Warning>
|
||||
|
||||
## Overview
|
||||
## Visão geral
|
||||
|
||||
This guide provides step-by-step instructions to install and configure the Twenty application using Docker Compose. The aim is to make the process straightforward and prevent common pitfalls that could break your setup.
|
||||
Este guia fornece instruções passo a passo para instalar e configurar o aplicativo Twenty usando Docker Compose. O objetivo é tornar o processo simples e evitar armadilhas comuns que possam quebrar sua configuração.
|
||||
|
||||
**Important:** Only modify settings explicitly mentioned in this guide. Altering other configurations may lead to issues.
|
||||
**Importante:** Modifique apenas as configurações explicitamente mencionadas neste guia. Alterar outras configurações pode levar a problemas.
|
||||
|
||||
See docs [Setup Environment Variables](/l/pt/developers/self-host/capabilities/setup) for advanced configuration. All environment variables must be declared in the docker-compose.yml file at the server and / or worker level depending on the variable.
|
||||
Veja a documentação [Configurar Variáveis de Ambiente](/l/pt/developers/self-host/capabilities/setup) para configuração avançada. Todas as variáveis de ambiente devem ser declaradas no arquivo docker-compose.yml no nível do servidor e/ou trabalhador, dependendo da variável.
|
||||
|
||||
## System Requirements
|
||||
## Requisitos do Sistema
|
||||
|
||||
* RAM: Ensure your environment has at least 2GB of RAM. Insufficient memory can cause processes to crash.
|
||||
* Docker & Docker Compose: Make sure both are installed and up-to-date.
|
||||
* RAM: Certifique-se de que seu ambiente tenha pelo menos 2GB de RAM. Memória insuficiente pode causar falhas nos processos.
|
||||
* Docker & Docker Compose: Certifique-se de que ambos estão instalados e atualizados.
|
||||
|
||||
## Option 1: One-line script
|
||||
## Opção 1: Script de uma linha
|
||||
|
||||
Install the latest stable version of Twenty with a single command:
|
||||
Instale a versão estável mais recente do Twenty com um único comando:
|
||||
|
||||
```bash
|
||||
bash <(curl -sL https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/scripts/install.sh)
|
||||
```
|
||||
|
||||
To install a specific version or branch:
|
||||
Para instalar uma versão ou branch específica:
|
||||
|
||||
```bash
|
||||
VERSION=vx.y.z BRANCH=branch-name bash <(curl -sL https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/scripts/install.sh)
|
||||
```
|
||||
|
||||
* Replace x.y.z with the desired version number.
|
||||
* Replace branch-name with the name of the branch you want to install.
|
||||
* Substitua x.y.z pelo número da versão desejada.
|
||||
* Substitua branch-name pelo nome da branch que você deseja instalar.
|
||||
|
||||
## Option 2: Manual steps
|
||||
## Opção 2: Etapas manuais
|
||||
|
||||
Follow these steps for a manual setup.
|
||||
Siga estas etapas para uma configuração manual.
|
||||
|
||||
### Step 1: Set Up the Environment File
|
||||
### Etapa 1: Configure o arquivo de ambiente
|
||||
|
||||
1. **Create the .env File**
|
||||
1. **Crie o arquivo .env**
|
||||
|
||||
Copy the example environment file to a new .env file in your working directory:
|
||||
Copie o exemplo de arquivo de ambiente para um novo arquivo .env no seu diretório de trabalho:
|
||||
|
||||
```bash
|
||||
curl -o .env https://raw.githubusercontent.com/twentyhq/twenty/refs/heads/main/packages/twenty-docker/.env.example
|
||||
```
|
||||
|
||||
2. **Generate Secret Tokens**
|
||||
2. **Gere Tokens Secretos**
|
||||
|
||||
Run the following command to generate a unique random string:
|
||||
Execute o seguinte comando para gerar uma string aleatória única:
|
||||
|
||||
```bash
|
||||
openssl rand -base64 32
|
||||
```
|
||||
|
||||
**Important:** Keep this value secret / do not share it.
|
||||
**Importante:** Mantenha este valor em segredo / não o compartilhe.
|
||||
|
||||
3. **Update the `.env`**
|
||||
3. **Atualize o `.env`**
|
||||
|
||||
Replace the placeholder value in your .env file with the generated token:
|
||||
Substitua o valor do espaço reservado no seu arquivo .env pelo token gerado:
|
||||
|
||||
```ini
|
||||
APP_SECRET=first_random_string
|
||||
```
|
||||
|
||||
4. **Set the Postgres Password**
|
||||
4. **Defina a Senha do Postgres**
|
||||
|
||||
Update the `PG_DATABASE_PASSWORD` value in the .env file with a strong password without special characters.
|
||||
Atualize o valor `PG_DATABASE_PASSWORD` no arquivo .env com uma senha forte sem caracteres especiais.
|
||||
|
||||
```ini
|
||||
PG_DATABASE_PASSWORD=my_strong_password
|
||||
```
|
||||
|
||||
### Step 2: Obtain the Docker Compose File
|
||||
### Etapa 2: Obtenha o arquivo Docker Compose
|
||||
|
||||
Download the `docker-compose.yml` file to your working directory:
|
||||
Baixe o arquivo `docker-compose.yml` para o seu diretório de trabalho:
|
||||
|
||||
```bash
|
||||
curl -o docker-compose.yml https://raw.githubusercontent.com/twentyhq/twenty/refs/heads/main/packages/twenty-docker/docker-compose.yml
|
||||
```
|
||||
|
||||
### Step 3: Launch the Application
|
||||
### Etapa 3: Inicie o Aplicativo
|
||||
|
||||
Start the Docker containers:
|
||||
Inicie os contêineres Docker:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Step 4: Access the Application
|
||||
### Etapa 4: Acesse o Aplicativo
|
||||
|
||||
If you host twentyCRM on your own computer, open your browser and navigate to [http://localhost:3000](http://localhost:3000).
|
||||
Se você hospedar o twentyCRM no seu próprio computador, abra o navegador e acesse [http://localhost:3000](http://localhost:3000).
|
||||
|
||||
If you host it on a server, check that the server is running and that everything is ok with
|
||||
Se você hospedar em um servidor, verifique se o servidor está em execução e se está tudo ok com
|
||||
|
||||
```bash
|
||||
curl http://localhost:3000
|
||||
```
|
||||
|
||||
## Configuration
|
||||
## Configuração
|
||||
|
||||
### Expose Twenty to External Access
|
||||
### Expor o Twenty para Acesso Externo
|
||||
|
||||
By default, Twenty runs on `localhost` at port `3000`. To access it via an external domain or IP address, you need to configure the `SERVER_URL` in your `.env` file.
|
||||
Por padrão, o Twenty é executado em `localhost` na porta `3000`. Para acessá-lo via um domínio externo ou endereço IP, você precisa configurar o `SERVER_URL` no seu arquivo `.env`.
|
||||
|
||||
#### Understanding `SERVER_URL`
|
||||
#### Compreendendo `SERVER_URL`
|
||||
|
||||
* **Protocol:** Use `http` or `https` depending on your setup.
|
||||
* Use `http` if you haven't set up SSL.
|
||||
* Use `https` if you have SSL configured.
|
||||
* **Domain/IP:** This is the domain name or IP address where your application is accessible.
|
||||
* **Port:** Include the port number if you're not using the default ports (`80` for `http`, `443` for `https`).
|
||||
* **Protocolo:** Use `http` ou `https` dependendo da sua configuração.
|
||||
* Use `http` se você não configurou SSL.
|
||||
* Use `https` se você tiver SSL configurado.
|
||||
* **Domínio/IP:** Este é o nome de domínio ou endereço IP onde seu aplicativo está acessível.
|
||||
* **Porta:** Inclua o número da porta se você não estiver usando as portas padrão (`80` para `http`, `443` para `https`).
|
||||
|
||||
### SSL Requirements
|
||||
### Requisitos de SSL
|
||||
|
||||
SSL (HTTPS) is required for certain browser features to work properly. While these features might work during local development (as browsers treat localhost differently), a proper SSL setup is needed when hosting Twenty on a regular domain.
|
||||
SSL (HTTPS) é necessário para que certos recursos do navegador funcionem corretamente. Embora esses recursos possam funcionar durante o desenvolvimento local (já que os navegadores tratam o localhost de modo diferente), é necessária uma configuração adequada de SSL ao hospedar o Twenty em um domínio normal.
|
||||
|
||||
For example, the clipboard API might require a secure context - some features like copy buttons throughout the application might not work without HTTPS enabled.
|
||||
Por exemplo, a API da área de transferência pode exigir um contexto seguro - alguns recursos, como botões de cópia através do aplicativo, podem não funcionar sem HTTPS ativado.
|
||||
|
||||
We strongly recommend setting up Twenty behind a reverse proxy with SSL termination for optimal security and functionality.
|
||||
Recomendamos fortemente configurar o Twenty atrás de um proxy reverso com terminação SSL para segurança e funcionalidade ótimas.
|
||||
|
||||
#### Configuring `SERVER_URL`
|
||||
#### Configurando `SERVER_URL`
|
||||
|
||||
1. **Determine Your Access URL**
|
||||
* **Without Reverse Proxy (Direct Access):**
|
||||
1. **Determine sua URL de Acesso**
|
||||
* **Sem Proxy Reverso (Acesso Direto):**
|
||||
|
||||
If you're accessing the application directly without a reverse proxy:
|
||||
Se você estiver acessando o aplicativo diretamente sem um proxy reverso:
|
||||
|
||||
```ini
|
||||
SERVER_URL=http://your-domain-or-ip:3000
|
||||
```
|
||||
|
||||
* **With Reverse Proxy (Standard Ports):**
|
||||
* **Com Proxy Reverso (Portas Padrão):**
|
||||
|
||||
If you're using a reverse proxy like Nginx or Traefik and have SSL configured:
|
||||
Se você estiver usando um proxy reverso como Nginx ou Traefik e tiver SSL configurado:
|
||||
|
||||
```ini
|
||||
SERVER_URL=https://your-domain-or-ip
|
||||
```
|
||||
|
||||
* **With Reverse Proxy (Custom Ports):**
|
||||
* **Com Proxy Reverso (Portas Customizadas):**
|
||||
|
||||
If you're using non-standard ports:
|
||||
Se você estiver usando portas não-padrão:
|
||||
|
||||
```ini
|
||||
SERVER_URL=https://your-domain-or-ip:custom-port
|
||||
```
|
||||
|
||||
2. **Update the `.env` File**
|
||||
2. **Atualize o arquivo `.env`**
|
||||
|
||||
Open your `.env` file and update the `SERVER_URL`:
|
||||
Abra seu arquivo `.env` e atualize o `SERVER_URL`:
|
||||
|
||||
```ini
|
||||
SERVER_URL=http(s)://your-domain-or-ip:your-port
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
**Exemplos:**
|
||||
|
||||
* Direct access without SSL:
|
||||
* Acesso direto sem SSL:
|
||||
```ini
|
||||
SERVER_URL=http://123.45.67.89:3000
|
||||
```
|
||||
* Access via domain with SSL:
|
||||
* Acesso via domínio com SSL:
|
||||
```ini
|
||||
SERVER_URL=https://mytwentyapp.com
|
||||
```
|
||||
|
||||
3. **Restart the Application**
|
||||
3. **Reinicie o Aplicativo**
|
||||
|
||||
For changes to take effect, restart the Docker containers:
|
||||
Para que as alterações entrem em vigor, reinicie os contêineres Docker:
|
||||
|
||||
```bash
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
#### Considerations
|
||||
#### Considerações
|
||||
|
||||
* **Reverse Proxy Configuration:**
|
||||
* **Configuração de Proxy Reverso:**
|
||||
|
||||
Ensure your reverse proxy forwards requests to the correct internal port (`3000` by default). Configure SSL termination and any necessary headers.
|
||||
Certifique-se de que seu proxy reverso encaminha as solicitações para a porta interna correta (`3000` por padrão). Configure a terminação SSL e quaisquer cabeçalhos necessários.
|
||||
|
||||
* **Firewall Settings:**
|
||||
* **Configurações de Firewall:**
|
||||
|
||||
Open necessary ports in your firewall to allow external access.
|
||||
Abra as portas necessárias no seu firewall para permitir acesso externo.
|
||||
|
||||
* **Consistency:**
|
||||
* **Consistência:**
|
||||
|
||||
The `SERVER_URL` must match how users access your application in their browsers.
|
||||
A `SERVER_URL` deve corresponder à forma como os usuários acessam seu aplicativo nos navegadores.
|
||||
|
||||
#### Persistence
|
||||
#### Persistência
|
||||
|
||||
* **Data Volumes:**
|
||||
* **Volumes de Dados:**
|
||||
|
||||
The Docker Compose configuration uses volumes to persist data for the database and server storage.
|
||||
A configuração do Docker Compose usa volumes para persistir dados para o banco de dados e armazenamento do servidor.
|
||||
|
||||
* **Stateless Environments:**
|
||||
* **Ambientes Sem Estado:**
|
||||
|
||||
If deploying to a stateless environment (e.g., certain cloud services), configure external storage to persist data.
|
||||
Se estiver implantando em um ambiente sem estado (por exemplo, certos serviços de nuvem), configure armazenamento externo para persistir dados.
|
||||
|
||||
## Backup and Restore
|
||||
## Backup e restauração
|
||||
|
||||
Regular backups protect your CRM data from loss.
|
||||
Backups regulares protegem os dados do seu CRM contra perda.
|
||||
|
||||
### Create a Database Backup
|
||||
### Crie um backup do banco de dados
|
||||
|
||||
```bash
|
||||
docker exec twenty-postgres pg_dump -U postgres twenty > backup_$(date +%Y%m%d).sql
|
||||
```
|
||||
|
||||
### Automate Daily Backups
|
||||
### Automatize backups diários
|
||||
|
||||
Add to your crontab (`crontab -e`):
|
||||
Adicione ao seu crontab (`crontab -e`):
|
||||
|
||||
```bash
|
||||
0 2 * * * docker exec twenty-postgres pg_dump -U postgres twenty > /backups/twenty_$(date +\%Y\%m\%d).sql
|
||||
```
|
||||
|
||||
### Restore from Backup
|
||||
### Restaurar a partir de um backup
|
||||
|
||||
1. Stop the application:
|
||||
1. Pare o aplicativo:
|
||||
|
||||
```bash
|
||||
docker compose stop twenty-server twenty-front
|
||||
```
|
||||
|
||||
2. Restore the database:
|
||||
2. Restaure o banco de dados:
|
||||
|
||||
```bash
|
||||
docker exec -i twenty-postgres psql -U postgres twenty < backup_20240115.sql
|
||||
```
|
||||
|
||||
3. Restart services:
|
||||
3. Reinicie os serviços:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Backup Best Practices
|
||||
### Melhores práticas de backup
|
||||
|
||||
* **Test restores regularly** — verify backups actually work
|
||||
* **Store backups off-site** — use cloud storage (S3, GCS, etc.)
|
||||
* **Encrypt sensitive data** — protect backups with encryption
|
||||
* **Retain multiple copies** — keep daily, weekly, and monthly backups
|
||||
* **Teste as restaurações regularmente** — verifique se os backups realmente funcionam
|
||||
* **Armazene os backups fora das instalações** — use armazenamento em nuvem (S3, GCS, etc.)
|
||||
* **Criptografe dados confidenciais** — proteja os backups com criptografia
|
||||
* **Mantenha várias cópias** — guarde backups diários, semanais e mensais
|
||||
|
||||
## Troubleshooting
|
||||
## Resolução de Problemas
|
||||
|
||||
If you encounter any problem, check [Troubleshooting](/l/pt/developers/self-host/capabilities/troubleshooting) for solutions.
|
||||
Se encontrar algum problema, verifique [Resolução de Problemas](/l/pt/developers/self-host/capabilities/troubleshooting) para soluções.
|
||||
|
||||
Reference in New Issue
Block a user