Update install instruction in docs (#376)

This commit is contained in:
Charles Bochet 2023-06-25 13:14:23 -07:00 committed by GitHub
parent 9c21975d2b
commit 3c5a270eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 33 deletions

View File

@ -2,6 +2,5 @@
DEBIAN_FRONTEND=noninteractive
cd infra/dev
make build
make up

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
%:
$(MAKE) -C infra/dev $*

View File

@ -36,21 +36,15 @@ Default values should work out of the box with the docker setup.
We provide a containerized environment with Docker and orchestrated with docker-compose.
This install will also provision a Postgres container.
The configuration is stored `infra/dev` folder.
The configuration is stored `infra/dev` folder.
```
cd infra/dev
make build
```
### 5. Auth setup
### 5. Migrate & seed
Right now the only way to authenticate yourself is to setup Google Sign-in in `server/.env`
We will add an easier option soon.
### 6. Migrate & seed
Before running the project, we need to apply database init and migrations and run the seed.
Before running the project, we need to init the database by running migration and seeds.
Always go the `infra/dev` folder to run the `make` commands.
@ -59,22 +53,26 @@ Start the containers:
make up
```
Run database migrations:
Run database migrations, generate prisma client and seed:
```
make server-prisma-migrate
```
Generate prisma client
```
make server-prisma-generate-client
```
Seed the database:
```
make server-prisma-seed
```
### 7. Start
You can also ssh directly in the container and run these commands from the container:
```
make sh
```
Then
```
cd server
yarn prisma:migrate
yarn prisma:generate-client
yarn prisma:seed
```
### 6. Start
Once this is completed you can run the project with the following commands:
@ -85,7 +83,7 @@ make front-start
server:
```
make-server start
make server-start
```
- front available on: http://localhost:3001
@ -93,10 +91,6 @@ make-server start
- postgres: available on http://localhost:5432 and should contain database named `twenty`
### 8. Development
Documented [here](../dev/workflows.mdx)
## Without Docker
While Docker is the recommended way to run Twenty, you might want to run the project directly on your machine.
@ -119,7 +113,7 @@ cp ./server/.env.example ./server/.env
Most default value should work out of the box, but don't forget to update the database connection string.
### 4. Build
### 4. Build, Migrate & Seed
On the frontend:
```
cd front
@ -131,14 +125,11 @@ On the server side:
cd server
yarn
yarn prisma:migrate
yarn prisma:generate-client
yarn prisma:seed
```
You can also run `yarn prisma:seed` to seed the database with mock data.
### 5. Auth Setup
Right now the only way to authenticate yourself is to setup Google Sign-in in `server/.env`
We will add an easier option soon.
### 6. Start
### 5. Start
On the frontend:
```
cd front

View File

@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.0",
"version": "0.1.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",