Update yarn commands (#4644)

* Simplify commands

* Simplify commands

* Migrate all dev commands to project.json

* Fix tests
This commit is contained in:
Charles Bochet
2024-03-25 12:31:18 +01:00
committed by GitHub
parent 1639b2ad0e
commit e576fe0d67
14 changed files with 179 additions and 82 deletions

View File

@ -13,35 +13,31 @@ import DocCardList from '@theme/DocCardList';
## Useful commands
These commands should be exectued from packages/twenty-server folder.
From any other folder you can run `yarn nx <command>` twenty-server.
### First time setup
```
yarn prisma:migrate # run migrations
yarn prisma:generate # generate prisma and nestjs-graphql schemas
yarn prisma:seed # provision database with seeds
# alternatively, you can run
yarn prisma:reset # all-in-one command to reset, migrate, seed and generate schemas
yarn nx database:reset # setup the database with dev seeds
```
### Starting the app
```
nx prisma:migrate twenty-server
nx prisma:generate twenty-server
nx start:dev twenty-server
yarn nx start
```
### Lint
```
nx lint twenty-server
yarn nx lint
```
### Test
```
nx test twenty-server
yarn nx test:unit
```
### Resetting the database
@ -49,7 +45,7 @@ nx test twenty-server
If you want to reset the database, you can run the following command:
```bash
nx database:reset twenty-server
yarn nx database:reset
```
:::warning

View File

@ -97,7 +97,7 @@ Setup database, run migrations, and seed:
```bash
make docker-dev-sh
yarn
yarn nx database:init twenty-server
yarn nx database:reset twenty-server
```
## Step 5: Start Twenty
@ -106,7 +106,7 @@ Run the project with the following commands from the `root` folder:
```bash
make docker-dev-sh
yarn nx start:dev twenty-server
yarn nx start twenty-server
```
and in a separate terminal:

View File

@ -183,12 +183,12 @@ yarn
Setup your database with the following command:
```bash
yarn nx database:init twenty-server
yarn nx database:reset twenty-server
```
Start the server and the frontend:
```bash
yarn nx start:dev twenty-server
yarn nx start twenty-server
yarn nx start twenty-front
```

View File

@ -36,7 +36,7 @@ The file shares are used to store uploaded images and files through the UI, and
3. Run `terraform plan -out tfplan`
4. Run `terraform apply tfplan`
5. Connect to server `az containerapp exec --name twenty-server -g twenty-crm-rg`
6. Initialize the database from the server `yarn database:init`
6. Initialize the database from the server `yarn database:init:prod`
7. Go to https://your-twenty-front-fqdn - located in the portal
#### Production docker containers

View File

@ -24,7 +24,7 @@ REFRESH_TOKEN_SECRET=replace_me_with_a_random_string_refresh
### Not able to login
If you encounter errors, (not able to log into the application after inputting an email) after the inital setup, try running `docker exec -it twenty-backend-1 yarn database:reset` and see if that solves your issue.
If you encounter errors, (not able to log into the application after inputting an email) after the inital setup, try running `docker exec -it twenty-backend-1 yarn nx database:reset` and see if that solves your issue.
### Cannot connect to server, running behind a reverse proxy