From 1f3858371ec0ae83f87469f1904ac42197632fc6 Mon Sep 17 00:00:00 2001
From: Dave MacLeod <56599343+Dhghomon@users.noreply.github.com>
Date: Thu, 12 Dec 2024 10:22:18 +0900
Subject: [PATCH] +Two new CLI commands and env vars for imports on startup
---
src/content/doc-surrealdb/cli/env.mdx | 10 ++++++++++
src/content/doc-surrealdb/cli/start.mdx | 18 ++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/src/content/doc-surrealdb/cli/env.mdx b/src/content/doc-surrealdb/cli/env.mdx
index f10dfeba2..1df5ed36c 100644
--- a/src/content/doc-surrealdb/cli/env.mdx
+++ b/src/content/doc-surrealdb/cli/env.mdx
@@ -88,6 +88,11 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB
4398046511104 (4 GiB)
Maximum HTTP body size of the HTTP /import endpoints
+
+
SURREAL_IMPORT_FILE
+
None
+
Path to a SurrealQL file that will be imported when starting the server.
+
SURREAL_INSECURE_FORWARD_ACCESS_ERRORS
false
@@ -143,6 +148,11 @@ Environment variables can be used to tailor the behaviour of a running SurrealDB
Number of CPUs on the current device
Size of the SurrealCS connection pool.
+
+
SURREAL_TEMPORARY_DIRECTORY
+
None
+
Sets the directory for storing temporary database files.
+
SURREAL_TRANSACTION_CACHE_SIZE
10000
diff --git a/src/content/doc-surrealdb/cli/start.mdx b/src/content/doc-surrealdb/cli/start.mdx
index e9dea9735..61a281f28 100644
--- a/src/content/doc-surrealdb/cli/start.mdx
+++ b/src/content/doc-surrealdb/cli/start.mdx
@@ -114,6 +114,15 @@ The start command starts a SurrealDB server in memory, on disk, or in a distribu
Sets the hostname or IP address to listen for connections on
+
+
+ `--import-file`
+
+
+
+ Path to a SurrealQL (`.surql`) file that will be imported when starting the server
+
+
`-l` / `--log`
@@ -168,6 +177,15 @@ The start command starts a SurrealDB server in memory, on disk, or in a distribu
Sets whether strict mode is enabled on this database instance
+
+
+ `--temporary-directory`
+
+
+
+ Sets the directory for storing temporary database files
+