Update docs, remove password strong regex, hide tasks (#755)

* Update docs, remove password strong regex, hide tasks

* Update docs
This commit is contained in:
Charles Bochet
2023-07-19 09:45:31 -07:00
committed by GitHub
parent ce3e023a00
commit ca5191169f
26 changed files with 54 additions and 58 deletions

View File

@ -1,4 +1,4 @@
{
"label": "Getting started",
"label": "Start",
"position": 1
}

View File

@ -1,10 +0,0 @@
---
sidebar_custom_props:
icon: TbCloud
---
# Cloud setup
The easiest way to quickly try the app is to signup on [app.twenty.com](https://app.twenty.com).
The signup is free.

View File

@ -0,0 +1,19 @@
---
sidebar_custom_props:
icon: TbBolt
---
import ThemedImage from '@theme/ThemedImage';
# Getting Started
## Trying Twenty
The easiest way to quickly try the app is to signup on [app.twenty.com](https://app.twenty.com).
The signup is free.
<ThemedImage sources={{light: "../../img/light-sign-in.png", dark:"../../img/dark-sign-in.png"}} style={{width:'100%', maxWidth:'800px'}}/>
## Developer documentation
If you are looking to locally install the project, either to try it or to contribute, you will find all the information you need in our [developer guide](../developer/local-setup).

View File

@ -1,179 +0,0 @@
---
sidebar_position: 0
sidebar_custom_props:
icon: TbBolt
---
# Local Setup
This section will guide you through the Twenty installation on your local environment.
Twenty is designed to be developer-friendly, and your local installation should be up and running in a few minutes.
In a nutshell:
- we recommend using `yarn` installation but we also provide an easy way to provide the project with Docker.
- Twenty uses PostgreSQL as a database. If we don't have one available, we also provide a one-line command to provision a PostgreSQL instance through Docker.
The repository is structured as follows:
```
twenty
└───docs // contains this documentation
└───front // contains the frontend code for the application
└───server // contains the backend code for the application
└───infra // contains docker development/production-ready deployment configuration
```
## Yarn install (recommended)
**Note:** `npm` is currently not supporting local packages satisfactorily. We strongly recommend using `yarn` instead.
### 1. Pre-requisites
You need to have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), [node](https://nodejs.org/en/download) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/) installed on your computer.
### 2. Git clone
```
git clone git@github.com:twentyhq/twenty.git
```
### 3. PostgresSQL database
You also need to have a PosgresSQL database available. If you already have one available, you can skip this step.
If you don't, you can provision one through `docker` using the following command:
```
make provision-postgres
```
This will create a docker container, exposing a PostgresSQL instance at [http://localhost:5432](http://localhost:5432).
### 4. Setup env variables
Twenty requires a few environment variables to be set. Locally, we recommend setting them through `.env` file.
To do so, make a copy of .env.example files:
```
cp ./front/.env.example ./front/.env
cp ./server/.env.example ./server/.env
```
The default values should work out of the box. Don't forget to update the database connection string if you are using your own database instance.
### 5. Server setup
**Note:** we recommend that you use `nvm` to install the correct `node` version. We have added a `server/.nvmrc` to ensure all contributors are using the same version.
To build Twenty server and seed some data into your database:
```
cd server
nvm use #recommended
yarn
yarn prisma:reset
yarn start:dev
```
Twenty server will be running at [http://localhost:3000](http://localhost:3000).
### 6. Front setup
**Note:** similarly, we recommend that you use `nvm` to install the right node version.
```
cd front
nvm use #recommended
yarn
yarn start
```
Twenty front will be running at [http://localhost:3001](http://localhost:3001).
### 7. Sign in to your local Twenty installation
Browse [http://localhost:3001](http://localhost:3001). You can connect using our recently seeded demo account `tim@apple.dev`.
## Docker install
If you wish, you can also provision the project with docker. This come with a few advantages:
- provides the exact same environment as our core developer team
- includes some additional dependencies (such as `playwright`) that you might need if you wish to contribute to some advanced areas of the project.
- provisions a postgres database
### 1. Pre-requisites
Make sure you have the latest `Docker` and [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) versions installed on your computer.
You can run `docker --version` to check they it is installed.
### 2. Git clone
```
git clone git@github.com:twentyhq/twenty.git
```
### 3. Setup env variables
Twenty requires a few environment variables to be set. Locally, we recommend setting them through `.env` pattern.
```
cp ./front/.env.example ./front/.env
cp ./server/.env.example ./server/.env
```
The default values should work out of the box.
### 4. Build
We provide a containerized environment with Docker and orchestrated with docker-compose.
This install will also provision a Postgres container.
**Note:**: the configuration is stored `infra/dev` folder but you can run `make` commands direclty from the root folder.
```
make build
```
### 5. Migrate & seed
Before running the project, you need to initialize the database by running migration and seeds.
Start the containers:
```
make up
```
Run database migrations, generate prisma client and seed:
```
make server-prisma-reset
```
### 6. Start Twenty
Once this is completed you can run the project with the following commands:
front:
```
make front-start
```
server:
```
make server-start
```
- front available on: http://localhost:3001
- server available on: http://localhost:3000/healthz
- postgres: available on http://localhost:5432 and should contain database named `default`
### 7. Sign in to your local Twenty installation
Browse [http://localhost:3001](http://localhost:3001). You can connect using our recently seeded demo account `tim@apple.dev`.
### 8. (Optional)
If you don't want to use make command and work directly from the container, you can also ssh directly in the container
```
make sh
```
Then run commands through yarn:
```
cd server
yarn prisma:reset
```

View File

@ -1,45 +0,0 @@
---
sidebar_custom_props:
icon: TbServer
---
# Self hosting
Right now, docker containers are the only option we currently support. However we are actively working on providing simple options to self host Twenty yourself.
Feel free to open issues on [Github](https://github.com/twentyhq/twenty) if you want a specific cloud provider to be supported.
Refer to this list to see what future options will be available
## Production docker containers
We provide a production-ready set of `Dockerfile` to allow you to build your own image and deploy it to your favorite cloud provider (Amazon Web Services, Google Cloud Platform, ...)
You will find these in [infra/prod/front/Dockerfile](https://github.com/twentyhq/twenty/blob/main/infra/prod/front/Dockerfile) and [infra/prod/server/Dockerfile](https://github.com/twentyhq/twenty/blob/main/infra/prod/server/Dockerfile) files.
### Front
```
docker build \
--build-arg REACT_APP_API_URL=REPLACE_ME \
--build-arg REACT_APP_AUTH_URL=REPLACE_ME \
--build-arg REACT_APP_FILES_URL=REPLACE_ME \
-t twenty-front:latest \
-f ./infra/prod/front/Dockerfile .
```
### Server
```
docker build \
-t twenty-server:latest \
-f ./infra/prod/server/Dockerfile .
```
To run the server, you will need to set a few environment variables you can find [here](https://github.com/twentyhq/twenty/blob/main/server/.env.example).
## Ready-to-deploy joint image (soon)
We are working on providing a joint docker image containing Twenty front and server, that you can deploy to Amazon Web Services (Elastic Beanstalk).
## Railway (soon)
Railway(railway.app) is an infrastructure platform that let you deploy to the cloud in one-click