mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
chore: update documentation titles and improve clarity in Docker installation guides
This commit is contained in:
parent
609086ecc8
commit
2329121bc0
4 changed files with 3 additions and 84 deletions
|
|
@ -81,87 +81,6 @@ bash migrate-database.sh --db-user myuser --db-password mypass --db-name mydb
|
|||
|
||||
---
|
||||
|
||||
## Option C — Manual steps
|
||||
|
||||
For users who prefer full control or whose platform doesn't support bash scripts (e.g. Windows without WSL2).
|
||||
|
||||
### Step 1 — Stop the old all-in-one container
|
||||
|
||||
Before mounting the `surfsense-data` volume into a new container, stop the existing one to prevent two PostgreSQL processes from writing to the same data directory:
|
||||
|
||||
```bash
|
||||
docker stop surfsense 2>/dev/null || true
|
||||
```
|
||||
|
||||
### Step 2 — Start a temporary PostgreSQL 14 container
|
||||
|
||||
```bash
|
||||
docker run -d --name surfsense-pg14-temp \
|
||||
-v surfsense-data:/data \
|
||||
-e PGDATA=/data/postgres \
|
||||
-e POSTGRES_USER=surfsense \
|
||||
-e POSTGRES_PASSWORD=surfsense \
|
||||
-e POSTGRES_DB=surfsense \
|
||||
pgvector/pgvector:pg14
|
||||
```
|
||||
|
||||
Wait ~10 seconds, then confirm it is healthy:
|
||||
|
||||
```bash
|
||||
docker exec surfsense-pg14-temp pg_isready -U surfsense
|
||||
```
|
||||
|
||||
### Step 3 — Dump the database
|
||||
|
||||
```bash
|
||||
docker exec -e PGPASSWORD=surfsense surfsense-pg14-temp \
|
||||
pg_dump -U surfsense surfsense > surfsense_backup.sql
|
||||
```
|
||||
|
||||
### Step 4 — Recover your SECRET\_KEY
|
||||
|
||||
```bash
|
||||
docker run --rm -v surfsense-data:/data alpine cat /data/.secret_key
|
||||
```
|
||||
|
||||
### Step 5 — Set up the new stack
|
||||
|
||||
```bash
|
||||
mkdir -p surfsense/scripts
|
||||
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/docker-compose.yml -o surfsense/docker-compose.yml
|
||||
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/.env.example -o surfsense/.env.example
|
||||
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/postgresql.conf -o surfsense/postgresql.conf
|
||||
curl -fsSL https://raw.githubusercontent.com/MODSetter/SurfSense/main/docker/scripts/init-electric-user.sh -o surfsense/scripts/init-electric-user.sh
|
||||
chmod +x surfsense/scripts/init-electric-user.sh
|
||||
cp surfsense/.env.example surfsense/.env
|
||||
```
|
||||
|
||||
Set `SECRET_KEY` in `surfsense/.env` to the value from Step 4.
|
||||
|
||||
### Step 6 — Start PostgreSQL 17 and restore
|
||||
|
||||
```bash
|
||||
cd surfsense
|
||||
docker compose up -d db
|
||||
docker compose exec db pg_isready -U surfsense # wait until ready
|
||||
docker compose exec -T db psql -U surfsense -d surfsense < ../surfsense_backup.sql
|
||||
```
|
||||
|
||||
### Step 7 — Start all services
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Step 8 — Clean up
|
||||
|
||||
```bash
|
||||
docker stop surfsense-pg14-temp && docker rm surfsense-pg14-temp
|
||||
docker volume rm surfsense-data # only after verifying migration succeeded
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `install.sh` runs normally with a blank database (no migration happened)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue