store-only -> sync-only flag change
parent
56503e3c01
commit
a2779f5719
|
@ -29,7 +29,7 @@ export async function serveCommand(
|
||||||
key?: string;
|
key?: string;
|
||||||
reindex?: boolean;
|
reindex?: boolean;
|
||||||
db?: string;
|
db?: string;
|
||||||
storeOnly?: boolean;
|
syncOnly?: boolean;
|
||||||
},
|
},
|
||||||
folder?: string,
|
folder?: string,
|
||||||
) {
|
) {
|
||||||
|
@ -37,7 +37,7 @@ export async function serveCommand(
|
||||||
"127.0.0.1";
|
"127.0.0.1";
|
||||||
const port = options.port ||
|
const port = options.port ||
|
||||||
(Deno.env.get("SB_PORT") && +Deno.env.get("SB_PORT")!) || 3000;
|
(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;
|
let dbFile = options.db || Deno.env.get("SB_DB_FILE") || silverBulletDbFile;
|
||||||
|
|
||||||
const app = new Application();
|
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;
|
let system: System<SilverBulletHooks> | undefined;
|
||||||
// system = undefined in storeOnly mode (no PlugOS instance on the server)
|
// system = undefined in syncOnly mode (no PlugOS instance on the server)
|
||||||
if (!storeOnly) {
|
if (!syncOnly) {
|
||||||
// Enable server-side processing
|
// Enable server-side processing
|
||||||
dbFile = path.resolve(folder, dbFile);
|
dbFile = path.resolve(folder, dbFile);
|
||||||
console.log(
|
console.log(
|
||||||
|
|
|
@ -45,8 +45,8 @@ await new Command()
|
||||||
"Path to TLS key",
|
"Path to TLS key",
|
||||||
)
|
)
|
||||||
.option(
|
.option(
|
||||||
"--store-only",
|
"--sync-only",
|
||||||
"Run the server as a pure space (file) store only without any backend processing (this disables 'server mode' in the client)",
|
"Run the server as a pure space (file) store only without any backend processing (this disables 'online mode' in the client)",
|
||||||
)
|
)
|
||||||
.option(
|
.option(
|
||||||
"--reindex",
|
"--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_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_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_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
|
## Using Authelia
|
||||||
You need to adjust a few configuration options in [[Authelia]] in order for SilverBullet to work as intended.
|
You need to adjust a few configuration options in [[Authelia]] in order for SilverBullet to work as intended.
|
||||||
|
|
Loading…
Reference in New Issue