mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
chore(server): update env example and docs (#9153)
This commit is contained in:
@@ -7,7 +7,7 @@ This document explains how to start server (@affine/server) locally with Docker
|
|||||||
|
|
||||||
## Run required dev services in docker compose
|
## Run required dev services in docker compose
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cp ./.docker/dev/compose.yml.example ./.docker/dev/compose.yml
|
cp ./.docker/dev/compose.yml.example ./.docker/dev/compose.yml
|
||||||
cp ./.docker/dev/.env.example ./.docker/dev/.env
|
cp ./.docker/dev/.env.example ./.docker/dev/.env
|
||||||
|
|
||||||
@@ -16,16 +16,17 @@ docker compose -f ./.docker/dev/compose.yml up -d
|
|||||||
|
|
||||||
## Build native packages (you need to setup rust toolchain first)
|
## Build native packages (you need to setup rust toolchain first)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# build native
|
# build native
|
||||||
yarn workspace @affine/server-native build
|
yarn workspace @affine/server-native build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Prepare dev environment
|
## Prepare dev environment
|
||||||
|
|
||||||
```
|
```sh
|
||||||
cd packages/backend/server
|
cd packages/backend/server
|
||||||
|
|
||||||
|
# uncomment all env variables here
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
yarn prisma db push
|
yarn prisma db push
|
||||||
yarn data-migration run
|
yarn data-migration run
|
||||||
@@ -33,7 +34,7 @@ yarn data-migration run
|
|||||||
|
|
||||||
## Start server
|
## Start server
|
||||||
|
|
||||||
```
|
```sh
|
||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ when server started, it will created a default user for testing:
|
|||||||
|
|
||||||
## Start frontend
|
## Start frontend
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# at project root
|
# at project root
|
||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
@@ -58,7 +59,7 @@ Now you should be able to start developing affine with server enabled.
|
|||||||
|
|
||||||
### Enable prisma studio (Database GUI)
|
### Enable prisma studio (Database GUI)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# available at http://localhost:5555
|
# available at http://localhost:5555
|
||||||
yarn prisma studio
|
yarn prisma studio
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# DATABASE_URL="postgres://affine:affine@localhost:5432/affine"
|
# DATABASE_URL="postgres://affine:affine@localhost:5432/affine"
|
||||||
# REDIS_SERVER_HOST=localhost
|
# REDIS_SERVER_HOST=localhost
|
||||||
|
# COPILOT_FAL_API_KEY=YOUR_KEY
|
||||||
|
# COPILOT_OPENAI_API_KEY=YOUR_KEY
|
||||||
|
|
||||||
# MAILER_HOST=localhost
|
# MAILER_HOST=127.0.0.1
|
||||||
# MAILER_PORT=1025
|
# MAILER_PORT=1025
|
||||||
# MAILER_SENDER="noreply@toeverything.info"
|
# MAILER_SENDER="noreply@toeverything.info"
|
||||||
# MAILER_USER="noreply@toeverything.info"
|
# MAILER_USER="noreply@toeverything.info"
|
||||||
|
|||||||
Reference in New Issue
Block a user