Skip to content

Commit 0ce0d3a

Browse files
authored
Merge pull request #44 from bcgov/jdev
chore(docs): add doc for local sandbox
2 parents dfd27cd + 7a58a18 commit 0ce0d3a

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

docker-compose/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ POSTGRES_DB=n8n
44

55
N8N_ENCRYPTION_KEY=super-secret-key
66
N8N_USER_MANAGEMENT_JWT_SECRET=even-more-secret
7+
N8N_DEFAULT_BINARY_DATA_MODE=filesystem
78

89
# For Mac users running OLLAMA locally
910
# See https://github.com/n8n-io/self-hosted-ai-starter-kit?tab=readme-ov-file#for-mac--apple-silicon-users

docs/sandbox.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Local Sandbox: Full Setup Guide
2+
3+
### 1. Build Community Nodes
4+
5+
This prepares the custom extensions that n8n will load.
6+
7+
- **Directory:** `community-nodes`
8+
- **Commands:**
9+
10+
```bash
11+
pnpm install
12+
pnpm build
13+
14+
```
15+
16+
### 2. .env file
17+
18+
Please copy `.env.example` in the directory `docker-compose` to `.env`.
19+
20+
### 3. Selective Database Migration
21+
22+
We will spin up **only** the PostgreSQL container to allow the migration script to run against it via `localhost`.
23+
24+
- **Step A: Start Postgres**
25+
In the `docker-compose` directory:
26+
27+
```bash
28+
docker compose up -d postgres
29+
30+
```
31+
32+
- **Step B: Run Migration**
33+
In the `external-hooks` directory:
34+
35+
```bash
36+
pnpm install
37+
pnpm bundle
38+
cp -r drizzle dist/
39+
40+
CUSTOM_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/n8n_custom node dist/migrate.cjs # pragma: allowlist secret
41+
42+
```
43+
44+
### 4. Launch the Full Stack
45+
46+
Now that the database is migrated and the nodes are built, bring up the rest of the services.
47+
48+
- **Directory:** `docker-compose`
49+
- **Command:**
50+
51+
```bash
52+
docker compose up --build
53+
54+
```

0 commit comments

Comments
 (0)