clean up package.json scripts
This commit is contained in:
@@ -25,12 +25,27 @@ Zep is a self-hosted, real-time communication platform built with Svelte 5 and S
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Local Development
|
## Getting Started
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
* Node.js (v18+)
|
* Node.js (v18+)
|
||||||
* pnpm
|
* pnpm
|
||||||
* SpacetimeDB CLI (`spacetime`)
|
* SpacetimeDB CLI (`spacetime`)
|
||||||
|
* **For Docker:** Docker and Docker Compose
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### One-Step Deployment (Recommended)
|
||||||
|
|
||||||
|
The easiest way to get Zep running locally is using Docker. This command builds and starts both the frontend and the SpacetimeDB module in a single step.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm run deploy:local
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Local Development (Manual Setup)
|
||||||
|
|
||||||
### 1. Backend Setup
|
### 1. Backend Setup
|
||||||
1. Navigate to the backend directory: `cd spacetimedb`
|
1. Navigate to the backend directory: `cd spacetimedb`
|
||||||
@@ -48,13 +63,14 @@ Zep is a self-hosted, real-time communication platform built with Svelte 5 and S
|
|||||||
VITE_SPACETIMEDB_DB_NAME=<your-db-name>
|
VITE_SPACETIMEDB_DB_NAME=<your-db-name>
|
||||||
```
|
```
|
||||||
3. Start the development server: `pnpm run dev`
|
3. Start the development server: `pnpm run dev`
|
||||||
|
* *For local network testing with SSL, use `pnpm run dev:ssl`.*
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Production Deployment
|
## Production Deployment
|
||||||
|
|
||||||
### Option 1: Docker (Recommended for Self-Hosting)
|
### Option 1: Docker
|
||||||
Zep can be deployed as a set of containers using Docker Compose.
|
Zep can be deployed using Docker Compose for a production-like local environment or self-hosting.
|
||||||
```bash
|
```bash
|
||||||
pnpm run deploy:local
|
pnpm run deploy:local
|
||||||
```
|
```
|
||||||
@@ -64,15 +80,11 @@ pnpm run deploy:local
|
|||||||
#### Backend (SpacetimeDB Maincloud)
|
#### Backend (SpacetimeDB Maincloud)
|
||||||
1. Publish the module to Maincloud:
|
1. Publish the module to Maincloud:
|
||||||
```bash
|
```bash
|
||||||
spacetime publish --server maincloud <your-db-name>
|
pnpm run spacetime:publish
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Frontend (Cloudflare Pages)
|
#### Frontend (Cloudflare Pages)
|
||||||
1. Build the project:
|
1. Build and deploy using Wrangler:
|
||||||
```bash
|
|
||||||
pnpm run build
|
|
||||||
```
|
|
||||||
2. Deploy using Wrangler:
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run deploy:cloudflare
|
pnpm run deploy:cloudflare
|
||||||
```
|
```
|
||||||
|
|||||||
+5
-9
@@ -5,20 +5,16 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host=0.0.0.0",
|
"dev": "vite --host=0.0.0.0",
|
||||||
"ssldev": "VITE_USE_SSL=true vite --host=0.0.0.0",
|
"dev:ssl": "VITE_USE_SSL=true vite --host=0.0.0.0",
|
||||||
"docker:local": "docker compose -f docker-compose.local.yml up --build",
|
"build": "pnpm run spacetime:generate && tsc -b && vite build",
|
||||||
"build": "tsc -b && vite build",
|
|
||||||
"format": "prettier . --write --ignore-path ../../.prettierignore",
|
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "pnpm run build && wrangler dev",
|
"format": "prettier . --write",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"spacetime:generate": "spacetime generate --lang typescript --out-dir src/module_bindings --module-path spacetimedb",
|
"spacetime:generate": "spacetime generate --lang typescript --out-dir src/module_bindings --module-path spacetimedb",
|
||||||
"spacetime:publish:local": "spacetime publish --module-path spacetimedb --server local",
|
|
||||||
"spacetime:publish": "spacetime publish --module-path spacetimedb --server maincloud",
|
"spacetime:publish": "spacetime publish --module-path spacetimedb --server maincloud",
|
||||||
|
"spacetime:publish:local": "spacetime publish --module-path spacetimedb --server local",
|
||||||
"deploy:local": "docker compose -f docker-compose.local.yml up --build",
|
"deploy:local": "docker compose -f docker-compose.local.yml up --build",
|
||||||
"deploy:maincloud": "docker compose -f docker-compose.maincloud.yml up --build",
|
"deploy:cloudflare": "pnpm run build && wrangler deploy"
|
||||||
"deploy:cloudflare": "wrangler deploy",
|
|
||||||
"deploy": "pnpm run build && wrangler deploy"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^7.2.0",
|
"@fortawesome/fontawesome-free": "^7.2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user