Skip to content

Commit ebba038

Browse files
authored
Merge pull request #22 from recogito/lwj/doc-updates
Doc updates
2 parents 2dbca93 + d442b25 commit ebba038

File tree

5 files changed

+56
-68
lines changed

5 files changed

+56
-68
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.18.2
1+
22.20.0

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "starlight",
2+
"name": "recogito.github.io",
33
"type": "module",
44
"version": "0.0.1",
55
"scripts": {
@@ -16,4 +16,4 @@
1616
"sharp": "^0.34.3",
1717
"typescript": "^5.4.2"
1818
}
19-
}
19+
}

src/content/docs/guides/local-development.mdx

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,6 @@ docker --version
9797
cd recogito-server
9898
```
9999

100-
:::note[Supabase CLI Compatibility - pgsodium Extension]
101-
If using Supabase CLI version 2.20.4 or later, you need to make a one-time fix to the migration file:
102-
103-
Edit `supabase/migrations/20230524173605_remote_commit.sql` and comment out line 13:
104-
```sql
105-
-- CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium";
106-
```
107-
108-
**Why this is needed:**
109-
- Newer Supabase CLI versions don't pre-create the `pgsodium` schema in local development
110-
- Supabase is [deprecating the pgsodium extension](https://supabase.com/docs/guides/database/extensions/pgsodium) and does not recommend its use for new projects
111-
- Recogito doesn't use pgsodium's encryption features
112-
- Your data remains secure: **Supabase projects are encrypted at rest by default** (SOC2 & HIPAA compliant)
113-
114-
**Production deployments:**
115-
If your production instance was created before this change and already has pgsodium installed, it will continue to work. However, the extension is not actively used by Recogito, so this change is safe for all environments.
116-
:::
117-
118100
2. **Start Supabase locally**
119101

120102
```bash
@@ -200,36 +182,26 @@ docker --version
200182
The `supabase db reset` command only runs migrations - it doesn't populate roles and groups from config.json.
201183
:::
202184

203-
7. **Create test users**
185+
7. **Create test users and run tests**
186+
187+
Recogito Server has a number of `Jest` tests that are in the `jest/tests/projects.test.ts` file. These tests verify some base functionality.
188+
189+
To simplify the process going forward, modify the `run_tests.sh` file to be executable:
204190

205191
```bash
206-
export SUPABASE_HOST=http://localhost:54321
207-
export SUPABASE_SERVICE_KEY=<service_role_key from step 2>
208-
export PROFESSOR_PW=password123
209-
export STUDENT_PW=password123
210-
export TUTOR_PW=password123
211-
export READER_PW=password123
212-
export INVITE_PW=password123
213-
export PROFESSOR_GROUP_ID='f918b2f8-f587-4ee1-9f2d-35b3aed0b1e6'
214-
node create-test-users.js -f config.json
192+
chmod +x run_tests.sh
215193
```
216194

217-
This creates test accounts for development:
218-
- `[email protected]` / `password123`
219-
- `[email protected]` / `password123`
220-
- `[email protected]` / `password123`
221-
- `[email protected]` / `password123`
222-
- `[email protected]` / `password123`
223-
224-
8. **Assign test users to organization groups**
195+
Then execute the tests from the root directory of the repository:
225196

226197
```bash
227-
export SUPABASE_HOST=http://localhost:54321
228-
export SUPABASE_SERVICE_KEY=<service_role_key from step 2>
229-
node assign-test-user-groups.js -f config.json
198+
./run_tests.sh
230199
```
231200

232-
This assigns test users to appropriate groups:
201+
The test script will create a number of test users that you can use locally to access the client and test fuctionality.
202+
203+
This creates test accounts for development:
204+
233205
- `[email protected]` → Org Professor (can create projects)
234206
- `[email protected]` → Org Readers (read-only)
235207
- `[email protected]` → Org Readers (read-only)

src/content/docs/guides/self-hosting.mdx

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ ssh root@your_server_ip
109109
Update the system:
110110
```bash
111111
apt update
112+
apt upgrade
112113
```
113114

114115
Create a new user with sudo privileges:
@@ -125,6 +126,13 @@ ufw enable
125126
ufw status
126127
```
127128

129+
Best practice is to not utilize the `root` login except in special circumstances. Go ahead and exit the instance and SSH in with the new `recogito` user.
130+
131+
```bash
132+
exit
133+
ssh recogito@your_server_ip
134+
```
135+
128136
### 2. Install Nginx
129137

130138
Install and configure the web server:
@@ -214,31 +222,31 @@ Use [Supabase JWT Generator](https://supabase.com/docs/guides/self-hosting/docke
214222
- **MINIO_ROOT_USER/PASSWORD**: MinIO dashboard credentials
215223
- **PGADMIN_ADMIN_EMAIL/PASSWORD**: pgAdmin web access
216224

217-
### 6. Run Installation
225+
### 6. Configure Nginx Routes
218226

219-
Execute the installation script:
220-
```bash
221-
sudo bash ./install-self-hosted-docker.sh
222-
```
227+
Copy and customize Nginx configuration files:
223228

224-
Respond "Yes" to database push when prompted.
229+
#### Client Configuration
225230

226-
### 7. Configure Nginx Routes
231+
You will need 5 URLs for this setup
227232

228-
Copy and customize Nginx configuration files:
233+
- A client URL for accessing the Recogito Studio client
234+
- A server URL for API calls
235+
- A MinIO URL for accessing the MinIO dashboard
236+
- A pgAdmin URL for accessing pgAdmin
237+
- A Portainer URL for accessing the Portainer UI
229238

230-
#### Client Configuration
231239
```bash
232-
sudo cp ./nginx.client.example.com /etc/nginx/sites-available/client.example.com
233-
sudo nano /etc/nginx/sites-available/client.example.com
240+
sudo cp ./nginx.client.example.com /etc/nginx/sites-available/<your client url>
241+
sudo nano /etc/nginx/sites-available/<your client url>
234242
```
235243

236244
Replace `client.example.com` with your actual client domain.
237245

238246
#### Server Configuration
239247
```bash
240-
sudo cp ./nginx.server.example.com /etc/nginx/sites-available/server.example.com
241-
sudo nano /etc/nginx/sites-available/server.example.com
248+
sudo cp ./nginx.server.example.com /etc/nginx/sites-available/<your server url>
249+
sudo nano /etc/nginx/sites-available/<your server url>
242250
```
243251

244252
Update:
@@ -270,11 +278,11 @@ map $http_upgrade $connection_upgrade {
270278
#### Enable Sites
271279
Create symbolic links:
272280
```bash
273-
sudo ln -s /etc/nginx/sites-available/server.example.com /etc/nginx/sites-enabled/
274-
sudo ln -s /etc/nginx/sites-available/client.example.com /etc/nginx/sites-enabled/
275-
sudo ln -s /etc/nginx/sites-available/pgadmin.example.com /etc/nginx/sites-enabled/
276-
sudo ln -s /etc/nginx/sites-available/minio.example.com /etc/nginx/sites-enabled/
277-
sudo ln -s /etc/nginx/sites-available/portainer.example.com /etc/nginx/sites-enabled/
281+
sudo ln -s /etc/nginx/sites-available/<your server url> /etc/nginx/sites-enabled/
282+
sudo ln -s /etc/nginx/sites-available/<your client url> /etc/nginx/sites-enabled/
283+
sudo ln -s /etc/nginx/sites-available/<your pgAdmin url> /etc/nginx/sites-enabled/
284+
sudo ln -s /etc/nginx/sites-available/<your MinIO url> /etc/nginx/sites-enabled/
285+
sudo ln -s /etc/nginx/sites-available/<your Portainer url> /etc/nginx/sites-enabled/
278286
```
279287

280288
Test and restart:
@@ -283,7 +291,7 @@ sudo nginx -t
283291
sudo systemctl restart nginx
284292
```
285293

286-
### 8. SSL Certificates with Let's Encrypt
294+
### 7. SSL Certificates with Let's Encrypt
287295

288296
Install Certbot:
289297
```bash
@@ -294,11 +302,11 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
294302

295303
Generate certificates for each domain:
296304
```bash
297-
sudo certbot --nginx -d client.example.com
298-
sudo certbot --nginx -d server.example.com
299-
sudo certbot --nginx -d pgadmin.example.com
300-
sudo certbot --nginx -d minio.example.com
301-
sudo certbot --nginx -d portainer.example.com
305+
sudo certbot --nginx -d <your client url>
306+
sudo certbot --nginx -d <your server url>
307+
sudo certbot --nginx -d <your pgAdmin url>
308+
sudo certbot --nginx -d <your MinIO url>
309+
sudo certbot --nginx -d <your portainer url>
302310
```
303311

304312
Verify auto-renewal:
@@ -307,6 +315,15 @@ sudo systemctl status snap.certbot.renew.service
307315
sudo certbot renew --dry-run
308316
```
309317

318+
### 8. Run Installation
319+
320+
Execute the installation script:
321+
```bash
322+
sudo bash ./install-self-hosted-docker.sh
323+
```
324+
325+
Respond "Yes" to database push when prompted.
326+
310327
## Testing Your Installation
311328

312329
### Test Client Access

src/content/docs/reference/client-architecture.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ Layered annotation system:
7474
- Multiple layers per document
7575
- Context-based organization
7676
- Private/shared annotations
77-
- Version tracking
7877

7978
### Backend Integration
8079

0 commit comments

Comments
 (0)