Go to file
Earlopain 7f4114736d
[Setup] Save redis data to named volume
Prevents it from creating anonymous volumes over and over again
2021-11-14 23:51:41 +01:00
app [Setup] Ignore limits when seeding 2021-11-14 22:16:36 +01:00
bin [Setup] Replace vagrant with docker 2021-11-14 03:31:26 +01:00
config [Setup] Ignore limits when seeding 2021-11-14 22:16:36 +01:00
db [ModActions] Remove category and description 2021-07-18 19:33:37 +02:00
docker [Setup] Improve docker setup 2021-11-14 14:12:51 +01:00
lib
public Renormalize all files to LF line ending 2021-11-08 17:24:37 +01:00
script [Setup] Replace vagrant with docker 2021-11-14 03:31:26 +01:00
test [Setup] Ignore limits when seeding 2021-11-14 22:16:36 +01:00
.browserslistrc [JS] Add missing browserslist file that makes all of this work. 2021-09-30 02:35:06 -07:00
.editorconfig
.env [IQDB] Remove dead code 2021-10-02 21:15:48 +02:00
.eslintrc.yml
.gitattributes [.gitattributes] Always ensure LF line endings 2021-11-08 17:23:23 +01:00
.gitignore [Setup] Replace vagrant with docker 2021-11-14 03:31:26 +01:00
.rubocop.yml [Misc] Add rubocop and solargraph config 2021-07-05 13:21:49 +02:00
.ruby-version [Ruby] Bump version to 2.7.3 2021-05-02 12:43:44 -07:00
.solargraph.yml [Misc] Add rubocop and solargraph config 2021-07-05 13:21:49 +02:00
babel.config.js [JS] Try to fully target older browsers 2021-09-30 02:26:05 -07:00
Capfile
config.ru
docker-compose.yml [Setup] Save redis data to named volume 2021-11-14 23:51:41 +01:00
Dockerfile [Setup] Improve docker setup 2021-11-14 14:12:51 +01:00
Gemfile
Gemfile.lock [Gems] Update gems 2021-08-26 18:24:49 -07:00
LICENSE
package.json [JS] Fix webpacker overriding babel config and setting loose 2021-09-24 20:32:07 -07:00
postcss.config.js
Procfile [Setup] Replace vagrant with docker 2021-11-14 03:31:26 +01:00
Rakefile
README.md [Setup] Ignore limits when seeding 2021-11-14 22:16:36 +01:00
yarn.lock [JS] Fix webpacker overriding babel config and setting loose 2021-09-24 20:32:07 -07:00

Installation (Easy mode - For development environments)

Prerequisites

If you are on Windows Docker Compose is already included, you do not need to install it yourself. If you are on Linux/MacOS you can probably use your package manager.

Installation

  1. Download and install the prerequisites.
  2. Clone the repo with git clone https://github.com/zwagoth/e621ng.git.
  3. cd into the repo.
  4. Run the following commands:
    docker-compose run -e DANBOORU_DISABLE_THROTTLES=true e621 /app/bin/setup
    docker-compose up
    
    After running the commands once only docker-compose up is needed to bring up the containers.
  5. This would be a good time to rewatch your favorite TV series installment, cook & have breakfast/lunch/dinner, walk the dog, clean your room, etc.
    By the time you get back the install will surely have completed.1
  6. To confirm the installation worked, open the web browser of your choice and enter http://localhost:3000 into the address bar and see if the website loads correctly.

1 If the install did not finish by the time an activity is complete please select another activity to avoid crippling boredom.

Development Database

The postgres server accepts outside connections which you can use to connect with a local client. Use localhost:34517 to connect to a database named danbooru2 with the user danbooru. Leave the password blank, anything will work.

Installation

Installation follows the same steps as the docker compose file. Ubuntu 20.04 is the current installation target. There is no script that performs these steps for you, as you need to split them up to match your infrastructure. Running a single machine install in production is possible, but is likely to be somewhat sluggish due to contention in disk between postgresql and elasticsearch. Minimum RAM is 4GB. You will need to adjust values in config files to match how much RAM is available. If you are targeting more than a hundred thousand posts and reasonable user volumes, you probably want to procure yourself a database server. See tuning guides for postgresql and elasticsearch for help planning these requirements.

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.

IQDB Service

IQDB integration is delegated to the IQDBS 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.