Giter Club home page Giter Club logo

e621-website's Introduction

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/e621ng/e621ng.git.
  3. cd into the repo.
  4. Copy the sample environment file with cp .env.sample .env.
  5. Run the following commands:
    docker compose run --rm -e SEED_POST_COUNT=100 e621 /app/bin/setup
    docker compose up
    
    After running the commands once only docker compose up is needed to bring up the containers.
  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. An admin account has been created automatically, the username and password are admin and e621test respectively.

Note: When gems or js packages are updated you need to execute docker compose build to reflect them in the container.

Development environment

This repo provides a Dev Container configuration. You can use something like the Dev Container extension for VSCode to make use of it. Simply install it, open the folder in VSCode, and click the button in the bottom right to open the folder in the Dev Container.

I followed the above instructions but it doesn't work, what should I do?

Try this:

  1. docker compose down -v to remove all volumes.
  2. docker compose build --no-cache to rebuild the image from scratch.
  3. Follow the instructions starting from step 5.

Why are there a bunch of changes I can't revert?

You're most likely using Windows. Give this a shot, it tells Git to stop tracking file mode changes:

git config core.fileMode false

Things to aid you during development

docker compose run --rm tests to execute the test suite.

docker compose run --rm rubocop to run the linter.

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

Production Setup

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 opensearch. 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 opensearch for help planning these requirements.

Production 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.

e621-website's People

Contributors

6 avatar albertc5 avatar albertyi avatar bapabooiee avatar brokeneagle avatar dependabot[bot] avatar donovandmc avatar earlopain avatar evazion avatar faucetlol avatar ghostrigger avatar kiranoot avatar kittey avatar kxz avatar liamwhite avatar lightforger avatar lllusion3469 avatar mseymour avatar r888888888 avatar randuin avatar s87gmil avatar sal-n avatar sasquire avatar shadyguy123 avatar sindrake avatar sixpunch avatar tokst avatar type-kun avatar xiaody avatar zatchii 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.