diff --git a/surfsense_web/content/docs/docker-installation/dev-compose.mdx b/surfsense_web/content/docs/docker-installation/dev-compose.mdx index 19b76eb7d..302026c2a 100644 --- a/surfsense_web/content/docs/docker-installation/dev-compose.mdx +++ b/surfsense_web/content/docs/docker-installation/dev-compose.mdx @@ -1,5 +1,5 @@ --- -title: Development Compose +title: Docker Compose Development description: Building SurfSense from source using docker-compose.dev.yml --- diff --git a/surfsense_web/content/docs/docker-installation/install-script.mdx b/surfsense_web/content/docs/docker-installation/install-script.mdx index d68938a3f..bbe95c230 100644 --- a/surfsense_web/content/docs/docker-installation/install-script.mdx +++ b/surfsense_web/content/docs/docker-installation/install-script.mdx @@ -1,5 +1,5 @@ --- -title: Install Script +title: One-Line Install Script description: One-command installation of SurfSense using Docker --- diff --git a/surfsense_web/content/docs/docker-installation/migrate-from-allinone.mdx b/surfsense_web/content/docs/docker-installation/migrate-from-allinone.mdx index 3de0b043d..c623b59e7 100644 --- a/surfsense_web/content/docs/docker-installation/migrate-from-allinone.mdx +++ b/surfsense_web/content/docs/docker-installation/migrate-from-allinone.mdx @@ -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) diff --git a/surfsense_web/content/docs/meta.json b/surfsense_web/content/docs/meta.json index f73b59e18..8401417cf 100644 --- a/surfsense_web/content/docs/meta.json +++ b/surfsense_web/content/docs/meta.json @@ -10,7 +10,7 @@ "manual-installation", "connectors", "how-to", - "---Development---", + "---Developers---", "testing" ] }