mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
Add docs how to run Colanode locally (#110)
This commit is contained in:
54
README.md
54
README.md
@@ -63,6 +63,60 @@ If you prefer to host your own Colanode server, check out the [`hosting/`](hosti
|
||||
|
||||
All required environment variables for the Colanode server can be found in the [`hosting/docker/docker-compose.yaml`](hosting/docker/docker-compose.yaml) file or [`hosting/kubernetes/README.md`](hosting/kubernetes/README.md) for Kubernetes deployments.
|
||||
|
||||
### Running locally
|
||||
|
||||
To run Colanode locally in development mode:
|
||||
|
||||
1. Clone the repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/colanode/colanode.git
|
||||
cd colanode
|
||||
```
|
||||
|
||||
2. Install dependencies at the project root:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Start the apps you want to run locally:
|
||||
|
||||
**Server**
|
||||
|
||||
```bash
|
||||
cd apps/server
|
||||
|
||||
# Copy the environment variable template and adjust values as needed
|
||||
cp .env.example .env
|
||||
|
||||
npm run dev
|
||||
```
|
||||
|
||||
To spin up the local dependencies (Postgres, Redis, Minio & Mail server) with Docker Compose, run this from
|
||||
the project root:
|
||||
|
||||
```bash
|
||||
docker compose -f hosting/docker/docker-compose.yaml up -d
|
||||
```
|
||||
|
||||
The compose file includes a `server` service. When you want to run the API locally with `npm run dev`, comment
|
||||
out (or override) that service so only the supporting services are started.
|
||||
|
||||
**Web**
|
||||
|
||||
```bash
|
||||
cd apps/web
|
||||
npm run dev
|
||||
```
|
||||
|
||||
**Desktop**
|
||||
|
||||
```bash
|
||||
cd apps/desktop
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Colanode is released under the [Apache 2.0 License](LICENSE).
|
||||
|
||||
74
apps/server/.env.example
Normal file
74
apps/server/.env.example
Normal file
@@ -0,0 +1,74 @@
|
||||
# ------------------------------------------------------------------
|
||||
# Example .env for Colanode Server
|
||||
# Copy this file to ".env" and adjust the values as needed.
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# General Node/Server Config
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
NODE_ENV=production
|
||||
SERVER_NAME="Colanode Local"
|
||||
SERVER_AVATAR=
|
||||
SERVER_MODE=standalone # 'standalone' or 'cluster'
|
||||
# SERVER_PATH_PREFIX=
|
||||
# SERVER_CORS_ORIGIN=http://localhost:4000
|
||||
# SERVER_CORS_MAX_AGE=7200
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# Account Configuration
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
ACCOUNT_VERIFICATION_TYPE=automatic # automatic | manual | email
|
||||
ACCOUNT_OTP_TIMEOUT=600 # seconds
|
||||
# ACCOUNT_GOOGLE_ENABLED=true
|
||||
# ACCOUNT_GOOGLE_CLIENT_ID=
|
||||
# ACCOUNT_GOOGLE_CLIENT_SECRET=
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# User Configuration
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
USER_STORAGE_LIMIT=10737418240 # 10 GB
|
||||
USER_MAX_FILE_SIZE=104857600 # 100 MB
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# PostgreSQL Configuration
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
POSTGRES_URL=postgres://colanode_user:postgrespass123@localhost:5432/colanode_db
|
||||
# POSTGRES_SSL_REJECT_UNAUTHORIZED=false
|
||||
# POSTGRES_SSL_CA=
|
||||
# POSTGRES_SSL_KEY=
|
||||
# POSTGRES_SSL_CERT=
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# Redis Configuration
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
REDIS_URL=redis://:your_valkey_password@localhost:6379/0
|
||||
REDIS_DB=0
|
||||
REDIS_JOBS_QUEUE_NAME=jobs
|
||||
REDIS_JOBS_QUEUE_PREFIX=colanode
|
||||
REDIS_EVENTS_CHANNEL=events
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# S3 Storage Configuration (MinIO)
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
STORAGE_S3_ENDPOINT=http://localhost:9000
|
||||
STORAGE_S3_ACCESS_KEY=minioadmin
|
||||
STORAGE_S3_SECRET_KEY=your_minio_password
|
||||
STORAGE_S3_BUCKET=colanode
|
||||
STORAGE_S3_REGION=us-east-1
|
||||
STORAGE_S3_FORCE_PATH_STYLE=true
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# SMTP Configuration
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
SMTP_ENABLED=false
|
||||
# SMTP_HOST=smtp
|
||||
# SMTP_PORT=1025
|
||||
# SMTP_USER=
|
||||
# SMTP_PASSWORD=
|
||||
# SMTP_EMAIL_FROM=your_email@example.com
|
||||
# SMTP_EMAIL_FROM_NAME=Colanode
|
||||
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
# AI Configuration (experimental)
|
||||
# ───────────────────────────────────────────────────────────────
|
||||
AI_ENABLED=false
|
||||
Reference in New Issue
Block a user