Code Monkey home page Code Monkey logo

e621ng's Introduction

Installation (Easy mode - For development environments)

Prerequisites

  • Latest version of Docker (download). The WSL2 backend on Windows is required.
  • Latest version of Docker Compose (download)
  • Git (download)

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.

Windows development environment

Developing on Windows requires some special setup to get good response times. Unfortunately performance across file systems is not great for WSL2 and recieving inotify events isn't possible. This leads to an all-around unpleasant experience. Read more about this here.

To mitigate this you can install a WSL distribution and clone the project inside there. Executing docker inside the container will still work, without directly accessing the host. Access the code with Remote Development for VSCode or simply use the network address \\wsl$.

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.

e621ng's People

Contributors

r888888888 avatar evazion avatar tokst avatar albertc5 avatar earlopain avatar lightforger avatar type-kun avatar brokeneagle avatar ghostrigger avatar liamwhite avatar kxz avatar kiranoot avatar albertyi avatar zatchii avatar dependabot[bot] avatar mseymour avatar sal-n avatar randuin avatar lllusion3469 avatar kittey avatar shadyguy123 avatar s87gmil avatar bapabooiee avatar sixpunch avatar 6 avatar sasquire avatar xiaody avatar kotarou3 avatar oktskzyk avatar dobacco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.