当前位置: 首页 > news >正文

Danbooru风格图片分享平台szurubooru

在这里插入图片描述

什么是 Danbooru ?

Danbooru 是一种流行的图片分享网站,以其独特的图片标签系统和搜索功能而闻名。"Danbooru风格"通常指的是模仿 Danbooru 网站的图片论坛或图片分享平台所具有的特定特征,如:

  1. 标签系统:用户可以给图片添加标签,便于分类和搜索。
  2. 搜索功能:强大的搜索工具,允许用户根据标签、上传日期等条件搜索图片。
  3. 用户交互:用户可以对图片进行评分、评论和收藏。
  4. 社区驱动:内容通常由用户上传和维护,形成一个社区。
  5. 图像板布局:图片以网格形式展示,用户可以浏览和选择感兴趣的图片。

什么是 szurubooru ?

Szurubooru 是一款图像板引擎,其灵感来自 DanbooruGelbooruMoebooru 等专为中小型社区提供的服务。它的名字源于波兰语,具有刮擦或擦洗的拟声意义。它的发音为shoorubooru

安装

在群晖上以 Docker 方式安装。

在注册表中搜索 szurubooru

  • 服务端选择第一个 szurubooru/server,版本选择 latest

本文写作时, latest 版本对应为 2.5

  • 客户端选择第三个 szurubooru/client,版本选择 latest

本文写作时, latest 版本对应为 2.5

env.txt

命名为 env.txt 而不是默认的 .env ,是为了在 FileStation 中编辑方便

参照了官方的 example.env,地址:https://github.com/rr-/szurubooru/blob/master/doc/example.env

相比 example.env,只修改了本机端口,以及图片和数据库的存储目录,改用了相对路径

# Database credentials
POSTGRES_USER=szuru
POSTGRES_PASSWORD=changeme# This shows up on the homescreen, indicating build information
BUILD_INFO=latest# Port to expose HTTP service
# Set to 127.0.0.1:8080 if you wish to reverse-proxy the docker's port,
# otherwise the port specified here will be publicly accessible
PORT=7420# How many waitress threads to start
# 4 is the default amount of threads. If you experience performance
# degradation with a large number of posts, increasing this may
# improve performance, since waitress is most likely clogging up with Tasks.
THREADS=4# URL base to run szurubooru under
# See "Additional Features" section in INSTALL.md
BASE_URL=/# Directory to store image data
MOUNT_DATA=./data# Directory to store database files
MOUNT_SQL=./sql

config.yaml

参照了官方的 config.yaml.dist,地址:https://github.com/rr-/szurubooru/blob/master/server/config.yaml.dist

config.yaml 直接采用了原版 config.yaml.dist 的内容,未做任何修改

# rather than editing this file, it is strongly suggested to create config.yaml
# and override only what you need.# shown in the website title and on the front page
name: szurubooru
# full url to the homepage of this szurubooru site, with no trailing slash
domain: # example: http://example.com
# used to salt the users' password hashes and generate filenames for static content
secret: change# Delete thumbnails and source files on post delete
# Original functionality is no, to mitigate the impacts of admins going
# on unchecked post purges.
delete_source_files: nothumbnails:avatar_width: 300avatar_height: 300post_width: 300post_height: 300# settings used to download files from the web on behalf of the api users
user_agent:
max_dl_filesize: 25.0E+6 # maximum filesize limit in bytes# automatically convert animated GIF uploads to video formats
convert:gif:to_webm: falseto_mp4: false# allow posts to be uploaded even if some image processing errors occur
allow_broken_uploads: false# used to send password reset e-mails
smtp:host: # example: localhostport: # example: 25user: # example: botpass: # example: groovy123from: # example: noreply@example.com# if host is left empty the password reset feature will be disabled,# in which case it is recommended to fill contactEmail so that users# know who to contact when they want to reset their passwordcontact_email: # example: bob@example.com. Meant for manual password reset proceduresenable_safety: yestag_name_regex: ^\S+$
tag_category_name_regex: ^[^\s%+#/]+$pool_name_regex: ^\S+$
pool_category_name_regex: ^[^\s%+#/]+$# don't make these more restrictive unless you want to annoy people; if you do
# customize them, make sure to update the instructions in the registration form
# template as well.
password_regex: '^.{5,}$'
user_name_regex: '^[a-zA-Z0-9_-]{1,32}$'# webhooks to call when events occur (such as post/tag/user/etc. changes)
# the listed urls will be called with a HTTP POST request with a payload
# containing a snapshot resource as JSON. See doc/API.md for details
webhooks:# - https://api.example.com/webhooks/default_rank: regularprivileges:'users:create:self':            anonymous # Registration permission'users:create:any':             administrator'users:list':                   regular'users:view':                   regular'users:edit:any:name':          moderator'users:edit:any:pass':          moderator'users:edit:any:email':         moderator'users:edit:any:avatar':        moderator'users:edit:any:rank':          moderator'users:edit:self:name':         regular'users:edit:self:pass':         regular'users:edit:self:email':        regular'users:edit:self:avatar':       regular'users:edit:self:rank':         moderator # one can't promote themselves or anyone to upper rank than their own.'users:delete:any':             administrator'users:delete:self':            regular'user_tokens:list:any':         administrator'user_tokens:list:self':        regular'user_tokens:create:any':       administrator'user_tokens:create:self':      regular'user_tokens:edit:any':         administrator'user_tokens:edit:self':        regular'user_tokens:delete:any':       administrator'user_tokens:delete:self':      regular'posts:create:anonymous':       regular'posts:create:identified':      regular'posts:list':                   anonymous'posts:reverse_search':         regular'posts:view':                   anonymous'posts:view:featured':          anonymous'posts:edit:content':           power'posts:edit:flags':             regular'posts:edit:notes':             regular'posts:edit:relations':         regular'posts:edit:safety':            power'posts:edit:source':            regular'posts:edit:tags':              regular'posts:edit:thumbnail':         power'posts:feature':                moderator'posts:delete':                 moderator'posts:score':                  regular'posts:merge':                  moderator'posts:favorite':               regular'posts:bulk-edit:tags':         power'posts:bulk-edit:safety':       power'posts:bulk-edit:delete':       power'tags:create':                  regular'tags:edit:names':              power'tags:edit:category':           power'tags:edit:description':        power'tags:edit:implications':       power'tags:edit:suggestions':        power'tags:list':                    regular'tags:view':                    anonymous'tags:merge':                   moderator'tags:delete':                  moderator'tag_categories:create':        moderator'tag_categories:edit:name':     moderator'tag_categories:edit:color':    moderator'tag_categories:edit:order':    moderator'tag_categories:list':          anonymous'tag_categories:view':          anonymous'tag_categories:delete':        moderator'tag_categories:set_default':   moderator'pools:create':                 regular'pools:edit:names':             power'pools:edit:category':          power'pools:edit:description':       power'pools:edit:posts':             power'pools:list':                   regular'pools:view':                   anonymous'pools:merge':                  moderator'pools:delete':                 moderator'pool_categories:create':       moderator'pool_categories:edit:name':    moderator'pool_categories:edit:color':   moderator'pool_categories:list':         anonymous'pool_categories:view':         anonymous'pool_categories:delete':       moderator'pool_categories:set_default':  moderator'comments:create':              regular'comments:delete:any':          moderator'comments:delete:own':          regular'comments:edit:any':            moderator'comments:edit:own':            regular'comments:list':                regular'comments:view':                regular'comments:score':               regular'snapshots:list':               power'uploads:create':               regular'uploads:use_downloader':       power## ONLY SET THESE IF DEPLOYING OUTSIDE OF DOCKER
#debug: 0 # generate server logs?
#show_sql: 0 # show sql in server logs?
#data_url: /data/
#data_dir: /var/www/data
## usage: schema://user:password@host:port/database_name
## example: postgres://szuru:dog@localhost:5432/szuru_test
#database:

docker-compose.yml

参照了官方的 docker-compose.yml,地址:https://github.com/rr-/szurubooru/blob/master/docker-compose.yml

version: '2'services:server:image: szurubooru/server:latestcontainer_name: szuru-serverdepends_on:- sqlenvironment:## These should be the names of the dependent containers listed below,## or FQDNs/IP addresses if these services are running outside of DockerPOSTGRES_HOST: sql## Credentials for database:POSTGRES_USER: ${POSTGRES_USER}POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}## Commented Values are Default:#POSTGRES_DB: defaults to same as POSTGRES_USER#POSTGRES_PORT: 5432#LOG_SQL: 0 (1 for verbose SQL logs)THREADS: ${THREADS}volumes:- "${MOUNT_DATA}:/data"- "./config.yaml:/opt/app/config.yaml"client:image: szurubooru/client:latestcontainer_name: szuru-clientdepends_on:- serverenvironment:BACKEND_HOST: serverBASE_URL: ${BASE_URL}volumes:- "${MOUNT_DATA}:/data:ro"ports:- "${PORT}:80"sql:image: postgres:14-alpinecontainer_name: szuru-dbrestart: unless-stoppedenvironment:POSTGRES_USER: ${POSTGRES_USER}POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}volumes:- "${MOUNT_SQL}:/var/lib/postgresql/data""

然后执行下面的命令

# 新建文件夹 szurubooru 和 子目录
mkdir -p /volume1/docker/szurubooru/{data,sql}# 进入 szurubooru 目录
cd /volume1/docker/szurubooru# 修改目录权限
chmod a+rw data# 将 env.txt、config.yaml、docker-compose.yml 放入当前目录# 一键启动
docker-compose --env-file env.txt up -d

运行

在浏览器中输入 http://群晖IP:7420 ,如果看到👇这个提示,表示还未完成初始化设置

稍等一会儿

点顶部的 Register 菜单注册账号

主界面上多了一些菜单

现在可以 Upload 图片了,支持直接上传图片,也可以粘贴图片的 URL 地址

拖入一张图片

Upload all 上传

点击图片,开始写评论,还可以添加 tags

参考文档

rr-/szurubooru: Image board engine, Danbooru-style.
地址:https://github.com/rr-/szurubooru


http://www.mrgr.cn/news/21403.html

相关文章:

  • 【2024高教社杯国赛A题】数学建模国赛建模过程+完整代码论文全解全析
  • 如何从硬盘恢复已删除/丢失的文件?硬盘恢复已删除的文件技巧
  • 分布式光伏的劣势
  • 数据链路层
  • (五十九)第 9 章 查找(B 树)
  • 非空约束(Not Null)
  • 数字化平台跨界融合增值:新起点与新机遇
  • c++修炼之路之特殊类设计与类型转换
  • LoRA微调基础知识点
  • 饲料加工机器设备有哪些组成部分
  • 微信小程序和普通网页有什么不同
  • 【阿里云】个人认证与公司认证
  • Python中pickle文件操作及案例-学习篇
  • tb-nightly库安装报错
  • sobel_dir 方向图和sobel的一些想法
  • 视频编辑的新助手:基于大模型的智能代理
  • c++高级编程第2版pdf
  • vue项目打包后,生成的index.html直接本地打开后没内容
  • Track 06:量子计算机概述
  • [SDK]-组合框 和 列表框控件