Updated README.md

This commit is contained in:
Bobby Wibowo 2020-06-18 04:09:01 +07:00
parent 4aeb364d0d
commit fc0433dd67
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -47,6 +47,22 @@ During development, the rebuilt files will be saved in `dist-dev` directory inst
Once you feel like your modifications are ready for production usage, you can then run `yarn build` to build production-ready files that will actually go to `dist` directory. Once you feel like your modifications are ready for production usage, you can then run `yarn build` to build production-ready files that will actually go to `dist` directory.
## Failing to build dependencies
Some dependencies may fail to build with Python 2.x, in particular `sqlite3` package.
If that happens, I recommend building dependencies with Python 3.x instead.
To force Python 3.x for dependencies building, you can choose to create a file named `.npmrc` in your lolisafe root directory, and fill it with:
```none
python=/path/to/your/python3.x
```
Or you can try the alternative solutions listed in here: [https://github.com/nodejs/node-gyp#configuring-python-dependency](https://github.com/nodejs/node-gyp#configuring-python-dependency).
> Note: Despite the file being named `.npmrc`, that preference will also be used when installing dependencies with `yarn`, so I still recommend sticking with it.
## Updating when you have modified some files ## Updating when you have modified some files
Try to use [git stash](https://www.git-scm.com/docs/git-stash). Try to use [git stash](https://www.git-scm.com/docs/git-stash).
@ -68,7 +84,7 @@ Afterwards, you can instead clone your fork in your production server and pull u
## Script for missing thumbnails ## Script for missing thumbnails
Thumbnails will not be automatically generated for existing files, that had been uploaded prior to enabling thumbnails in the config file. Thumbnails will not be automatically generated for files that were uploaded before enabling thumbnails generation in the config file.
To generate thumbnails for those files, you can use `yarn thumbs`. To generate thumbnails for those files, you can use `yarn thumbs`.
@ -87,9 +103,9 @@ verbose: 0 = only print missing thumbs (default), 1 = print all
cfcache: 0 = do not clear cloudflare cache (default), 1 = clear cloudflare cache cfcache: 0 = do not clear cloudflare cache (default), 1 = clear cloudflare cache
``` ```
For example, if you only want to generate thumbnails for image files without overwriting existing ones, you can run `yarn thumbs 1`. For example, if you only want to generate thumbnails for image files without overwriting existing ones, you can run `yarn thumbs 1`, or if you want to generate thumbnails for both image and video files, while also overwriting existsing ones, you can run `yarn thumbs 3 1`.
Or if you want to generate thumbnails for both image and video files, while also overwriting existsing ones, you can run `yarn thumbs 3 1`. You will also need to use this script to overwrite existing thumbnails if you want to change thumbnail size.
## ClamAV support ## ClamAV support