Skip to content

Commit b804c4d

Browse files
committed
docs(self-hosting): update documentation and clean up outdated links (CDP-3852)
Signed-off-by: YATIN JAMWAL <yatinjamwal07@gmail.com>
1 parent d6a76c9 commit b804c4d

6 files changed

Lines changed: 124 additions & 18 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Contributions are what make the open-source community such an amazing place to l
88
- Help with [open issues](https://github.com/CrowdDotDev/crowd.dev/issues).
99
- Add a new integration following our [framework](https://docs.crowd.dev/docs/integration-framework).
1010
- Help create tutorials and [blog](https://www.crowd.dev/blog) posts.
11-
- Improve [documentation](https://docs.crowd.dev/docs) by fixing incomplete or missing docs, bad wording, examples, or explanations.
11+
- Improve [documentation](./docs/self-hosting.md) by fixing incomplete or missing docs, bad wording, examples, or explanations.
1212

1313
Any contributions you make are **greatly appreciated**. ❤️
1414

@@ -106,7 +106,7 @@ cd scripts
106106

107107
The app will be available at http://localhost:8081
108108

109-
For more information on development, you can <a href="https://docs.crowd.dev/docs/docker-compose-single-machine-development-with-docker-images">check our docs</a>.
109+
For more information on development, you can [check our self-hosting guide](./docs/self-hosting.md).
110110

111111
#### Running services individually
112112

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ Key features:
1616

1717

1818
## Getting started
19-
⚠️ This documentation is outdated and needs to be reviewed.
2019

21-
To get started with self-hosting, take a look at our [self-hosting docs](https://docs.crowd.dev/docs/getting-started-with-self-hosting).
20+
To get started with self-hosting, please refer to our [self-hosting guide](./docs/self-hosting.md).
2221

23-
#### Deployment with Kubernetes
22+
#### Deployment with Docker
2423

25-
Our services can be deployed using Kubernetes, as well as a lightweight development environment using Docker. You can read more about it in our [self-hosting docs](https://docs.crowd.dev/docs/deployment).
24+
The project provides a comprehensive CLI tool for managing the platform's infrastructure and services using Docker Compose. You can find more information on how to use it in our [technical documentation](./docs/self-hosting.md).
2625

2726
#### Integrations
2827

29-
We currently support all our integrations for self-hosting. For each one of them, you will need to create your own application. You can see the steps for each integration in our [self-hosting integrations guide](https://docs.crowd.dev/docs/self-hosting).
28+
We support a wide range of integrations for self-hosting. For each integration, you will need to set up your own application credentials (e.g., via Nango). Details on configuration can be found in the [self-hosting guide](./docs/self-hosting.md).
3029

3130
### Development environment
3231

@@ -65,7 +64,7 @@ WITH_INSIGHTS=1 ./cli scaffold up
6564

6665
This app will be available at http://localhost:8081
6766

68-
For more information on development, you can <a href="https://docs.crowd.dev/docs/docker-compose-single-machine-development-with-docker-images">check our docs</a>.
67+
For more information on development, you can [check our self-hosting guide](./docs/self-hosting.md).
6968

7069

7170
## Contribution

docs/self-hosting.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Self-Hosting LFX Community Data Platform (CDP)
2+
3+
This guide provides technical instructions for self-hosting the Community edition of the LFX Community Data Platform (formerly crowd.dev) using Docker Compose.
4+
5+
## Prerequisites
6+
7+
Before you begin, ensure your system meets the following requirements:
8+
9+
### Hardware Requirements
10+
- **CPU**: 4+ cores recommended.
11+
- **RAM**: 16GB+ recommended (the platform runs several services including OpenSearch, Kafka, and Postgres).
12+
- **Storage**: 50GB+ of free space (depends on the volume of data you plan to ingest).
13+
14+
### Software Requirements
15+
- **Docker**: Engine 20.10+ and Docker Compose v2.0+.
16+
- **Node.js**: v16.16.0 (required for some local CLI utilities).
17+
- **Python**: 3.x (required for Tinybird CLI setup).
18+
19+
## Getting Started
20+
21+
1. **Clone the Repository**:
22+
```bash
23+
git clone https://github.com/linuxfoundation/crowd.dev.git
24+
cd crowd.dev
25+
```
26+
27+
2. **Install Dependencies**:
28+
```bash
29+
pnpm install
30+
```
31+
32+
3. **Configure Environment Variables**:
33+
Copy the distribution template to create your local override file:
34+
```bash
35+
cp backend/.env.dist.local backend/.env.override.local
36+
```
37+
*Note: For a "composed" environment where services run in Docker, you may also want to reference `backend/.env.dist.composed` for the correct hostnames (e.g., `db` instead of `localhost`).*
38+
39+
## Deployment Steps
40+
41+
The platform uses a custom CLI tool located in `scripts/cli` to simplify management.
42+
43+
### 1. Start Infrastructure (Scaffold)
44+
The "scaffold" includes essential services: PostgreSQL, Redis, OpenSearch, Kafka, and Tinybird.
45+
46+
```bash
47+
cd scripts
48+
./cli scaffold up
49+
```
50+
51+
This command will:
52+
- Set up the `crowd-bridge` Docker network.
53+
- Start all infrastructure containers defined in `scripts/scaffold.yaml`.
54+
- Set up the Tinybird CLI and virtual environment.
55+
56+
### 2. Run Database Migrations
57+
Once the infrastructure is up, apply the necessary schema migrations for Postgres and Tinybird:
58+
59+
```bash
60+
./cli migrate-up
61+
```
62+
63+
### 3. Start Application Services
64+
You can start all application services (API, Frontend, Workers) at once:
65+
66+
```bash
67+
./cli service up-all
68+
```
69+
70+
The application will be available at:
71+
- **Frontend**: http://localhost:8081
72+
- **API**: http://localhost:4000/api (default)
73+
74+
## Configuration Details
75+
76+
Key environment variables to review in `backend/.env.override.local`:
77+
78+
- `CROWD_API_URL`: The public-facing URL of your API.
79+
- `CROWD_API_JWT_SECRET`: A long, random string for securing sessions.
80+
- `CROWD_DB_*`: Database connection details (defaults work with `scaffold`).
81+
- `CROWD_REDIS_*`: Redis connection details.
82+
- `CROWD_TINYBIRD_BASE_URL`: URL for the local Tinybird instance (default: `http://localhost:7181/`).
83+
84+
## Operations & Maintenance
85+
86+
### Checking Logs
87+
To view logs for a specific service:
88+
```bash
89+
./cli service <service-name> logs
90+
```
91+
*(Available service names can be found in `scripts/services/`)*
92+
93+
### Backing up the Database
94+
```bash
95+
./cli db-backup <backup-name>
96+
```
97+
98+
### Restoring a Backup
99+
```bash
100+
./cli db-restore <backup-name>
101+
```
102+
103+
## Security & Production Notes
104+
105+
- **Reverse Proxy**: It is highly recommended to use a reverse proxy (like Nginx) to handle SSL/TLS termination. A template is provided in `scripts/scaffold/nginx/`.
106+
- **Secrets**: Ensure `CROWD_API_JWT_SECRET` and all database passwords are changed from their default values in a production environment.
107+
- **Persistence**: All data is stored in Docker volumes (e.g., `pgdata-dev`, `opensearch-dev`). Ensure these volumes are backed up regularly.
108+
109+
## Troubleshooting
110+
111+
- **Memory Issues**: If services fail to start, check if Docker has enough memory allocated (especially on macOS/Windows).
112+
- **Network Conflicts**: Ensure the subnet `10.90.0.0/24` (default) does not conflict with your existing network. You can override this in `scripts/cli` or via environment variables.

frontend/src/config/integrations/discourse/components/discourse-settings-drawer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<div
6262
class="text-2xs text-gray-500 leading-normal mb-1"
6363
>
64-
Create a new API key in your Discourse account's settings page. You must be an admin user to connect your acount. <a href="https://docs.crowd.dev/docs/discourse-integration#api-key" target="_blank" rel="noopener noreferrer" class="hover:underline">Read more</a>
64+
Create a new API key in your Discourse account's settings page. You must be an admin user to connect your acount.
6565
</div>
6666
<el-input
6767
ref="focus"
@@ -87,7 +87,7 @@
8787
<div
8888
class="text-2xs text-gray-500 leading-normal mb-1"
8989
>
90-
Create new webhooks in your Discourse account's settings page with the following credentials. <a href="https://docs.crowd.dev/docs/discourse-integration#webhooks" target="_blank" rel="noopener noreferrer" class="hover:underline">Read more</a>
90+
Create new webhooks in your Discourse account's settings page with the following credentials.
9191
</div>
9292
</div>
9393
<el-form

frontend/src/config/integrations/gitlab/components/gitlab-connect.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const connect = async () => {
4848
title: 'Are you the admin of your GitLab organization?',
4949
titleClass: 'text-lg pt-2',
5050
message: `Only GitLab users with admin permissions are able to connect LFX's GitLab integration.
51-
If you are an organization member, you will need an approval from the GitLab workspace admin. <a href="https://docs.crowd.dev/docs/github-integration" target="_blank">Read more</a>`,
51+
If you are an organization member, you will need an approval from the GitLab workspace admin.`,
5252
icon: 'fa-circle-info fa-light',
5353
confirmButtonText: "I'm the GitLab organization admin",
5454
cancelButtonText: 'Invite organization admin to this workspace',

frontend/src/config/integrations/hackernews/components/hackernews-settings-drawer.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@
2020
<div class="flex flex-col gap-2 items-start mb-2">
2121
<span class="text-xs font-light mb-2 text-gray-900">
2222
Monitor mentions of your community/organization on Hacker News.
23-
<br />Historical data is available after the 1st of December 2022.
24-
<a
25-
href="https://docs.crowd.dev/docs/hacker-news-integration"
26-
target="__blank"
27-
>
28-
Read more</a>.
29-
</span>
23+
Historical data is available after the 1st of December 2022.
24+
</span>
3025
<span class="text-sm font-medium">Track posts mentioning your community/organization</span>
3126
<span class="text-2xs font-light mb-2 text-gray-600">
3227
Monitor your community/organization being mentioned in the top 500 of

0 commit comments

Comments
 (0)