Go to file
Earlopain 6910369e2a
[Misc] Add rubocop and solargraph config
A bunch of rules are disabled or tweaked for the current style
2021-07-05 13:21:49 +02:00
.circleci remove docker compose install 2019-01-24 17:43:34 -08:00
app [Replacements] Fix broken state when rescaling notes 2021-06-24 16:22:04 +02:00
bin [Rails] Upgrade to rails 6.1 + fix tests 2021-02-25 12:08:09 -08:00
config [Misc] Add rubocop and solargraph config 2021-07-05 13:21:49 +02:00
db Merge branch 'master' into style-changes 2021-06-02 14:28:22 +02:00
doc fixes #3320 2017-10-09 14:45:23 -07:00
lib maintenance: add rake tasks for maintenance jobs. 2018-10-09 20:11:24 -05:00
public Merge pull request #250 from Earlopain/post-favorites 2021-04-03 03:11:33 -04:00
script Normalize EOL style + newline at end of files. 2020-10-24 05:50:32 -07:00
test [Replacements] Fix broken state when rescaling notes 2021-06-24 16:22:04 +02:00
tmp
vagrant [Vagrant] Update image to ubuntu 20.04 2021-06-02 12:09:31 +02:00
.editorconfig Added a basic editorconfig 2020-01-26 18:38:49 +02:00
.env Recommend posts on /posts/show based on voting patterns 2018-07-20 12:14:16 -07:00
.eslintrc.yml Add eslint support. 2018-08-05 18:30:25 -05:00
.gitignore Update webpacker and fix a bunch of broken things with it 2019-08-03 20:25:22 -07: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 Update webpacker and fix a bunch of broken things with it 2019-08-03 20:25:22 -07:00
Capfile move newrelic + deploytags gem to production env, rename cap tasks to .rake 2016-12-06 15:47:21 -08:00
config.ru Revise memory targets 2020-03-03 11:18:40 -08:00
Gemfile [Rails] Update to rails 6 2021-02-25 12:08:09 -08:00
Gemfile.lock [Gems] Update gems 2021-05-05 15:32:14 -07:00
LICENSE
package.json Update gems and JS 2020-07-18 06:36:16 -07:00
postcss.config.js Update webpacker and fix a bunch of broken things with it 2019-08-03 20:25:22 -07:00
Procfile [Install] Don't run mock services that don't exist anymore 2020-12-23 15:52:58 -05:00
Rakefile
README.md [Readme] Update hostname for development machine 2021-05-02 19:35:50 +02:00
Vagrantfile [Vagrant] Update image to ubuntu 20.04 2021-06-02 12:09:31 +02:00
yarn.lock [JS] Update yarn deps 2021-04-02 22:02:35 -07:00

Installation (Easy mode - For development environments)

Prerequisites

  • Latest version of VirtualBox and the VM Extension Pack (download)
  • Latest version of Vagrant (download)

Installation

  1. Download and install the prerequisites
  2. Open Command Prompt/Terminal and run the following commands:
    vagrant plugin install vagrant-hostmanager
    vagrant plugin install vagrant-bindfs
    vagrant plugin install vagrant-vbguest
    
  3. Download and extract the repo
  4. cd into the repo using Command Prompt/Terminal
  5. Run the following command: vagrant up
  6. 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
  7. To confirm the installation worked, open the web browser of your choice and enter http://e621.local 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.

VirtualBox Troubleshooting

In case the VM doesn't start with the error VT-x not available and the error description WHvCapabilityCodeHypervisorPresent is FALSE! the the following solution should resolve the issue:

This error usually occurs, when the Hyper-V or the Windows Hypervisor Platform features are activated.
To deactivate these features, press the windows key and enter Turn Windows features on or off, here you can deactivate both features by unchecking their respective checkboxes. Don't forget to restart the computer after deactivating the features.

Installation

Installation follows the same steps as the vagrant setup script. 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.

There are some forks that contain full docker setups. If you are looking for a Docker deployment and don't want to wait for this repo to slowly get there, look into those.

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.