mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-21 20:59:04 +00:00
Updated README.md
Updated screenshot. Edited claim about node 12 not being tested, as I've tested it. Couldn't find any issues. Added a new section about updating when you have modified some files. Rephrased ClamAV support section a bit. Updated dependencies: knex: 0.21.0 -> 0.21.1 Rebuilt yarn.lock file with node 12. Nothing significant really changed. Things seem to be backward compatible to node 10.
This commit is contained in:
parent
e73514b62e
commit
4759995ff3
29
README.md
29
README.md
@ -1,6 +1,6 @@
|
||||
# lolisafe, a small safe worth protecting
|
||||
|
||||
[](https://safe.fiery.me)
|
||||
[](https://safe.fiery.me)
|
||||
|
||||
[](https://raw.githubusercontent.com/WeebDev/lolisafe/master/LICENSE)
|
||||
|
||||
@ -16,7 +16,7 @@ Configuration file of lolisafe, `config.js`, is also NOT fully compatible with t
|
||||
|
||||
## Running in production mode
|
||||
|
||||
1. Ensure you have Node v10.x installed (v12.x have NOT been tested).
|
||||
1. Ensure you have at least Node v10.x installed (v12.x should also work just fine).
|
||||
2. Clone this repo.
|
||||
3. Copy `config.sample.js` as `config.js`.
|
||||
4. Modify port, domain and privacy options if desired.
|
||||
@ -47,6 +47,25 @@ 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.
|
||||
|
||||
## Updating when you have modified some files
|
||||
|
||||
Try to use [git stash](https://www.git-scm.com/docs/git-stash).
|
||||
|
||||
Basically you'll be doing this:
|
||||
|
||||
1. `git stash` to stash away your changes.
|
||||
2. `git pull` to pull updates.
|
||||
3. `yarn install` (or `yarn install --production`) to install dependencies matching the updated `yarn.lock` file.
|
||||
4. `git stash pop` (or `git stash apply`) to restore your changes.
|
||||
|
||||
Be warned that some files may have been updated too heavily that they will require manual merging.
|
||||
|
||||
If you only do some small modifications such as editing `views/_globals.njk` and not much else, it's generally safe to do this even in a live production environment. But it's still best practice to at least review just what have been updated, and whether you will need to do some manual merging beforehand.
|
||||
|
||||
Still, I heavily recommend simply forking this repository and manually merging upstream changes whenever you feel like doing so. Read more about [syncing a fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).
|
||||
|
||||
Afterwards, you can instead clone your fork in your production server and pull updates from there. You can then choose to only install production dependencies with `yarn install --production` there (hint: this is how I setup safe.fiery.me).
|
||||
|
||||
## 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.
|
||||
@ -76,8 +95,10 @@ Or if you want to generate thumbnails for both image and video files, while also
|
||||
|
||||
This fork has an optional virus scanning support using [ClamAV](https://www.clamav.net/), through [clamdjs](https://github.com/NingLin-P/clamdjs) library.
|
||||
|
||||
It will scan new files right after they are uploaded. It will then print error messages to the uploaders (as in the virus names in ClamAV's databases) if the files are dirty.
|
||||
It will scan new files right after they are uploaded. It will then alert the uploaders of the virus names in ClamAV's database if their files are dirty.
|
||||
|
||||
On the down side, this will slow down uploads processing (as it has to wait for the scan results before responding the uploader's requests), however it's still highly recommended for public usage.
|
||||
Unfortunately, this will slow down uploads processing as it has to wait for scan results before responding the uploaders, however it's still highly recommended for public usage (or at least if you find Google Safe Search too annoying).
|
||||
|
||||
To enable this, make sure you have ClamAV daemon running, then fill in the daemon's IP and port into your config file.
|
||||
|
||||
From the config file you can also choose to exclude certain extensions from being scanned to lessen the burden on your server.
|
||||
|
@ -37,7 +37,7 @@
|
||||
"fluent-ffmpeg": "^2.1.2",
|
||||
"helmet": "^3.22.0",
|
||||
"jszip": "^3.4.0",
|
||||
"knex": "^0.21.0",
|
||||
"knex": "^0.21.1",
|
||||
"multer": "^1.4.2",
|
||||
"node-fetch": "^2.6.0",
|
||||
"nunjucks": "^3.2.1",
|
||||
|
30
yarn.lock
30
yarn.lock
@ -1301,7 +1301,7 @@ commander@^3.0.2:
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e"
|
||||
integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==
|
||||
|
||||
commander@^5.0.0:
|
||||
commander@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
|
||||
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
|
||||
@ -1912,9 +1912,9 @@ ee-first@1.1.1:
|
||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
electron-to-chromium@^1.3.413:
|
||||
version "1.3.418"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.418.tgz#840021191f466b803a873e154113620c9f53cec6"
|
||||
integrity sha512-i2QrQtHes5fK/F9QGG5XacM5WKEuR322fxTYF9e8O9Gu0mc0WmjjwGpV8c7Htso6Zf2Di18lc3SIPxmMeRFBug==
|
||||
version "1.3.422"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.422.tgz#5ed0ffa8796e14d5bd4a709505605c2bb4b5add0"
|
||||
integrity sha512-8HXl8Mje9nkNjZdFsRcoFkM7hXzQ3cMSxF+lx85CUg5j9lQvuYsKh5Ku5WnduxUvweZToMviOrplOQ9vzkdz2w==
|
||||
|
||||
emoji-regex@^7.0.1:
|
||||
version "7.0.3"
|
||||
@ -2897,9 +2897,9 @@ got@^9.6.0:
|
||||
url-parse-lax "^3.0.0"
|
||||
|
||||
graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.2:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
|
||||
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
|
||||
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
|
||||
|
||||
gulp-buble@^0.9.0:
|
||||
version "0.9.0"
|
||||
@ -3896,13 +3896,13 @@ kind-of@^6.0.0, kind-of@^6.0.2:
|
||||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
|
||||
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
|
||||
|
||||
knex@^0.21.0:
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/knex/-/knex-0.21.0.tgz#ed09cb5b596bf52295d09f680e8d3572d75a4ef2"
|
||||
integrity sha512-3dvT3lXlewre6l+3JCLdWV5v+Otp0IwXENFTuvcoDgtCzQu2tSSw45/jtNdLH52JpmoqFpCFXCpDciWAGcRGtw==
|
||||
knex@^0.21.1:
|
||||
version "0.21.1"
|
||||
resolved "https://registry.yarnpkg.com/knex/-/knex-0.21.1.tgz#4fba7e6c58c9f459846c3090be157a732fc75e41"
|
||||
integrity sha512-uWszXC2DPaLn/YznGT9wFTWUG9+kqbL4DMz+hCH789GLcLuYzq8werHPDKBJxtKvxrW/S1XIXgrTWdMypiVvsw==
|
||||
dependencies:
|
||||
colorette "1.1.0"
|
||||
commander "^5.0.0"
|
||||
commander "^5.1.0"
|
||||
debug "4.1.1"
|
||||
esm "^3.2.25"
|
||||
getopts "2.2.5"
|
||||
@ -5749,9 +5749,9 @@ postcss-value-parser@^3.0.0:
|
||||
integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
|
||||
|
||||
postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d"
|
||||
integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
|
||||
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
|
||||
|
||||
postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1:
|
||||
version "2.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user