1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-16 12:20:13 +01:00
pingvin-share/docs
Qing Fu 02cd98fa9c
feat(auth): add OAuth2 login (#276)
* feat(auth): add OAuth2 login with GitHub and Google

* chore(translations): add files for Japanese

* fix(auth): fix link function for GitHub

* feat(oauth): basic oidc implementation

* feat(oauth): oauth guard

* fix: disable image optimizations for logo to prevent caching issues with custom logos

* fix: memory leak while downloading large files

* chore(translations): update translations via Crowdin (#278)

* New translations en-us.ts (Japanese)

* New translations en-us.ts (Japanese)

* New translations en-us.ts (Japanese)

* release: 0.18.2

* doc(translations): Add Japanese README (#279)

* Added Japanese README.

* Added JAPANESE README link to README.md.

* Updated Japanese README.

* Updated Environment Variable Table.

* updated zh-cn README.

* feat(oauth): unlink account

* refactor(oauth): make providers extensible

* fix(oauth): fix discoveryUri error when toggle google-enabled

* feat(oauth): add microsoft and discord as oauth provider

* docs(oauth): update README.md

* docs(oauth): update oauth2-guide.md

* set password to null for new oauth users

* New translations en-us.ts (Japanese) (#281)

* chore(translations): add Polish files

* fix(oauth): fix random username and password

* feat(oauth): add totp

* fix(oauth): fix totp throttle

* fix(oauth): fix qrcode and remove comment

* feat(oauth): add error page

* fix(oauth): i18n of error page

* feat(auth): add OAuth2 login

* fix(auth): fix link function for GitHub

* feat(oauth): basic oidc implementation

* feat(oauth): oauth guard

* feat(oauth): unlink account

* refactor(oauth): make providers extensible

* fix(oauth): fix discoveryUri error when toggle google-enabled

* feat(oauth): add microsoft and discord as oauth provider

* docs(oauth): update README.md

* docs(oauth): update oauth2-guide.md

* set password to null for new oauth users

* fix(oauth): fix random username and password

* feat(oauth): add totp

* fix(oauth): fix totp throttle

* fix(oauth): fix qrcode and remove comment

* feat(oauth): add error page

* fix(oauth): i18n of error page

* refactor: return null instead of `false` in `getIdOfCurrentUser` functiom

* feat: show original oauth error if available

* refactor: run formatter

* refactor(oauth): error message i18n

* refactor(oauth): make OAuth token available
someone may use it (to revoke token or get other info etc.)
also improved the i18n message

* chore(oauth): remove unused import

* chore: add database migration

* fix: missing python installation for nanoid

---------

Co-authored-by: Elias Schneider <login@eliasschneider.com>
Co-authored-by: ふうせん <10260662+fusengum@users.noreply.github.com>
2023-10-22 16:09:53 +02:00
..
CONTRIBUTING.es.md docs: move translated docs in docs folder 2023-04-02 18:53:54 +02:00
CONTRIBUTING.zh-cn.md docs: move translated docs in docs folder 2023-04-02 18:53:54 +02:00
oauth2-guide.md feat(auth): add OAuth2 login (#276) 2023-10-22 16:09:53 +02:00
README.es.md doc(translations): Add Japanese README (#279) 2023-10-10 08:19:28 +02:00
README.ja-jp.md doc(translations): Add Japanese README (#279) 2023-10-10 08:19:28 +02:00
README.zh-cn.md doc(translations): Add Japanese README (#279) 2023-10-10 08:19:28 +02:00


Pingvin Share


选择合适的语言阅读: 西班牙语, 英语, 简体中文, 日本语


Pingvin Share 是一个可自建的文件分享平台,是 WeTransfer 的一个替代品

特性

  • 通过可自定义后缀的链接分享文件
  • 可自定义任意大小的文件上传限制 (受制于托管所在的硬盘大小)
  • 对共享链接设置有效期限
  • 对共享链接设置访问次数和访问密码
  • 通过邮件自动发送共享链接
  • 整合 ClamAV 进行反病毒检查

🐧 了解一下 Pingvin Share

⌨️ 自建指南

注意Pingvin Share 仍处于开发阶段并且可能存在 bugs

Docker 部署 (推荐)

  1. 下载 docker-compose.yml
  2. 运行命令 docker-compose up -d

现在网站运行在 http://localhost:3000,尝试一下你本地的 Pingvin Share 🐧!

Stand-alone 部署

必须的依赖:

git clone https://github.com/stonith404/pingvin-share
cd pingvin-share

# 获取最新的版本
git fetch --tags && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)

# 启动后端 backend
cd backend
npm install
npm run build
pm2 start --name="pingvin-share-backend" npm -- run prod

# 启动前端 frontend
cd ../frontend
npm install
npm run build
pm2 start --name="pingvin-share-frontend" npm -- run start

现在网站运行在 http://localhost:3000,尝试一下你本地的 Pingvin Share 🐧!

整合组件

ClamAV (仅限 Docker 部署)

扫描上传文件中是否存在可疑文件,如果存在 ClamAV 会自动移除

  1. 在 docker-compose 配置中添加 ClamAV 容器 (见 docker-compose.yml 注释部分) 并启动容器
  2. Docker 会在启动 Pingvin Share 前启动 ClamAV也许会花费 1-2 分钟
  3. Pingvin Share 日志中应该有 "ClamAV is active"

请注意 ClamAV 会消耗很多 系统资源(特别是内存)

更多资源

升级

因为 Pingvin Share 仍处在开发阶段,在升级前请务必阅读 release notes 避免不可逆的改变

Docker 升级

docker compose pull
docker compose up -d

Stand-alone 升级

  1. 停止正在运行的 app

    pm2 stop pingvin-share-backend pingvin-share-frontend
    
  2. 重复 installation guide 中的步骤,除了 git clone 这一步

    cd pingvin-share
    
    # 获取最新的版本
    git fetch --tags && git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
    
    # 启动后端 backend
    cd backend
    npm run build
    pm2 restart pingvin-share-backend
    
    # 启动前端 frontend
    cd ../frontend
    npm run build
    pm2 restart pingvin-share-frontend
    

自定义品牌

你可以在管理员配置页面改变网站的名字和 logo

🖤 提交贡献

非常欢迎向 Pingvin Share 提交贡献! 请阅读 contribution guide 来提交你的贡献