store-only -> sync-only flag change
This commit is contained in:
parent
56503e3c01
commit
a2779f5719
@ -29,7 +29,7 @@ export async function serveCommand(
|
||||
key?: string;
|
||||
reindex?: boolean;
|
||||
db?: string;
|
||||
storeOnly?: boolean;
|
||||
syncOnly?: boolean;
|
||||
},
|
||||
folder?: string,
|
||||
) {
|
||||
@ -37,7 +37,7 @@ export async function serveCommand(
|
||||
"127.0.0.1";
|
||||
const port = options.port ||
|
||||
(Deno.env.get("SB_PORT") && +Deno.env.get("SB_PORT")!) || 3000;
|
||||
const storeOnly = options.storeOnly || Deno.env.get("SB_STORE_ONLY");
|
||||
const syncOnly = options.syncOnly || Deno.env.get("SB_SYNC_ONLY");
|
||||
let dbFile = options.db || Deno.env.get("SB_DB_FILE") || silverBulletDbFile;
|
||||
|
||||
const app = new Application();
|
||||
@ -85,8 +85,8 @@ To allow outside connections, pass -L 0.0.0.0 as a flag, and put a TLS terminato
|
||||
);
|
||||
|
||||
let system: System<SilverBulletHooks> | undefined;
|
||||
// system = undefined in storeOnly mode (no PlugOS instance on the server)
|
||||
if (!storeOnly) {
|
||||
// system = undefined in syncOnly mode (no PlugOS instance on the server)
|
||||
if (!syncOnly) {
|
||||
// Enable server-side processing
|
||||
dbFile = path.resolve(folder, dbFile);
|
||||
console.log(
|
||||
|
@ -45,8 +45,8 @@ await new Command()
|
||||
"Path to TLS key",
|
||||
)
|
||||
.option(
|
||||
"--store-only",
|
||||
"Run the server as a pure space (file) store only without any backend processing (this disables 'server mode' in the client)",
|
||||
"--sync-only",
|
||||
"Run the server as a pure space (file) store only without any backend processing (this disables 'online mode' in the client)",
|
||||
)
|
||||
.option(
|
||||
"--reindex",
|
||||
|
@ -122,7 +122,7 @@ You can configure SB with environment variables instead of flags as well. The fo
|
||||
* `SB_PORT`: Sets the port to listen to, e.g. `SB_PORT=1234`
|
||||
* `SB_FOLDER`: Sets the folder to expose, e.g. `SB_FOLDER=/space`
|
||||
* `SB_AUTH`: Loads an [[Authentication]] database from a (JSON encoded) string, e.g. `SB_AUTH=$(cat /path/to/.auth.json)`
|
||||
* `SB_STORE_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_STORE_ONLY=1`
|
||||
* `SB_SYNC_ONLY`: Runs the server in a "dumb" space store only mode (not indexing content or keeping other state), e.g. `SB_SYNC_ONLY=1`
|
||||
|
||||
## Using Authelia
|
||||
You need to adjust a few configuration options in [[Authelia]] in order for SilverBullet to work as intended.
|
||||
|
Loading…
Reference in New Issue
Block a user