Danbooru

Danbooru 是用 Rails 6 编写的可标记图像板。「Danbooru is a taggable image board written in Rails 6.」

Github stars Tracking Chart

安装

建议您在基于 Debian 的系统上安装 Danbooru,因为大多数必需的软件包都在 APT 上可用。 Danbooru已成功安装在 Fedora、CentOS、FreeBSD 和 OS X 上。 INSTALL.debian 安装脚本很简单,应该很容易适应其他平台。

为了获得最佳性能,PostgreSQL 和 Rails 至少需要 256MB 的 RAM。 随着数据库变大,内存需求将增长。

在生产中,Danbooru 使用 PostgreSQL 9.4,但是任何9.x版本都可以使用。
尽可能使用操作系统的程序包管理系统。 这将简化安装初始化脚本的过程,当从源代码进行编译时,这种情况不会总是发生。

故障排除

这些说明并不适用于所有人。如果您的设置无法正常工作,请按照以下通常建议的步骤操作:

  1. 测试数据库。确保可以使用 psql 连接到它。确保表存在。如果失败,则需要正确安装PostgreSQL,导入初始模式并运行迁移。
  2. 通过使用 Rails 控制台测试 Rails 数据库连接。运行 Post.count 以确保 Rails 可以连接到数据库。如果失败,则需要确保您的 Danbooru 配置文件正确。
  3. 测试 Nginx 以确保其正常工作。您可能需要调试 Nginx 配置文件。
  4. 检查所有日志文件。

服务

Danbooru 使用大量外部服务来委派某些功能。

出于开发目的,您可以仅运行这些服务的模拟版本。它们在 scripts/mock_services 中可用,并且可以使用 Foreman 和提供的 Procfile 自动启动。

亚马逊网络服务

为了启用以下功能,您将需要一个 AWS SQS 帐户:

  • Pool 版本
  • 发布版本
  • IQDB
  • 保存的搜索
  • 相关标签

Google API

以下功能需要一个 Google API 帐户:

  • 批量还原
  • 发布版本报告

IQDB服务

IQDB 集成委托给 IQDBS 服务

归档服务

为了访问 Pool 和帖子的版本化数据,您将需要安装和配置 Archives 服务

Reportbooru 服务

以下功能委托给 Reportbooru 服务:

  • 相关标签
  • 错过的搜寻报告
  • 热门搜寻报告
  • 最喜欢的搜寻
  • 上传趋势图

推荐服务

发布建议需要推荐服务

裁剪缩略图

裁剪缩略图有可选支持。这依赖于安装 libvips-8.6 或更高版本,并将 Danbooru.config.enable_image_cropping 设置为 true。

Overview

Name With Ownerdanbooru/danbooru
Primary LanguageRuby
Program languageRuby (Language Count: 9)
PlatformLinux, BSD, Mac
License:Other
Release Count1256
Last Release Nameproduction-2024.03.22-184732-utc (Posted on 2024-03-22 13:47:32)
First Release Namegd-resizer (Posted on )
Created At2010-02-04 19:59:27
Pushed At2024-03-26 19:22:14
Last Commit At2024-03-26 14:22:14
Stargazers Count2.1k
Watchers Count68
Fork Count397
Commits Count12.8k
Has Issues Enabled
Issues Count4655
Issue Open Count345
Pull Requests Count868
Pull Requests Open Count11
Pull Requests Close Count87
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Installation

It is recommended that you install Danbooru on a Debian-based system
since most of the required packages are available on APT. Danbooru
has been successfully installed on Fedora, CentOS, FreeBSD, and OS X.
The INSTALL.debian install script is straightforward and should be
simple to adapt for other platforms.

For best performance, you will need at least 256MB of RAM for
PostgreSQL and Rails. The memory requirement will grow as your
database gets bigger.

On production Danbooru uses PostgreSQL 9.4, but any 9.x release should
work.

Use your operating system's package management system whenever
possible. This will simplify the process of installing init scripts,
which will not always happen when compiling from source.

Troubleshooting

These instructions won't work for everyone. If your setup is not
working, here are the steps I usually recommend to people:

  1. Test the database. Make sure you can connect to it using psql. Make
    sure the tables exist. If this fails, you need to work on correctly
    installing PostgreSQL, importing the initial schema, and running the
    migrations.

  2. Test the Rails database connection by using rails console. Run
    Post.count to make sure Rails can connect to the database. If this
    fails, you need to make sure your Danbooru configuration files are
    correct.

  3. Test Nginx to make sure it's working correctly. You may need to
    debug your Nginx configuration file.

  4. Check all log files.

Services

Danbooru employs numerous external services to delegate some
functionality.

For development purposes, you can just run mocked version of these
services. They're available in scripts/mock_services and can be started
automatically using Foreman and the provided Procfile.

Amazon Web Services

In order to enable the following features, you will need an AWS SQS
account:

  • Pool versions
  • Post versions
  • IQDB
  • Saved searches
  • Related tags

Google APIs

The following features requires a Google API account:

  • Bulk revert
  • Post versions report

IQDB Service

IQDB integration is delegated to the IQDBS service.

Archive Service

In order to access versioned data for pools and posts you will
need to install and configure the Archives service.

Reportbooru Service

The following features are delegated to the Reportbooru service:

  • Related tags
  • Missed searches report
  • Popular searches report
  • Favorite searches
  • Upload trend graphs

Recommender Service

Post recommendations require the Recommender service.

Cropped Thumbnails

There's optional support for cropped thumbnails. This relies on installing
libvips-8.6 or higher and setting Danbooru.config.enable_image_cropping
to true.

To the top