mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Allow read-only installation
Fix #3453. Thanks to #3499, #3500 and #3521, most of the obstacles to read-only installation have been resolved. This PR addresses the final piece, ensuring that SillyTavern no longer changes directories to `serverDirectory` and outputs files there. Instead, it outputs or copies necessary files to the directory where it is being run. Now, `serverDirectory` is read-only for SillyTavern (i.e., SillyTavern will not attempt to modify `serverDirectory`). Additionally, this PR sets the permissions for copied `default-user` files to be writable, so even if SillyTavern is installed as read-only, the copied `default-user` folder can still be modified.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import process from 'node:process';
|
||||
import path from 'node:path';
|
||||
import isDocker from 'is-docker';
|
||||
import { serverDirectory } from './src/server-directory.js';
|
||||
|
||||
/**
|
||||
* Get the Webpack configuration for the public/lib.js file.
|
||||
@ -40,7 +41,7 @@ export default function getPublicLibConfig(forceDist = false) {
|
||||
|
||||
return {
|
||||
mode: 'production',
|
||||
entry: './public/lib.js',
|
||||
entry: path.join(serverDirectory, 'public/lib.js'),
|
||||
cache: {
|
||||
type: 'filesystem',
|
||||
cacheDirectory: cacheDirectory,
|
||||
|
Reference in New Issue
Block a user