forked from e621ng/e621ng
shorten README as well as fix 'open issues' badge (also E621 -> e621ng)
This commit is contained in:
parent
dbffa01c30
commit
142ee18c47
91
README.md
91
README.md
@ -1,12 +1,12 @@
|
||||
<div align="center">
|
||||
<img src="public/images/github-logo.svg" width="150" height="150" align="left">
|
||||
<div align="left">
|
||||
<h3>E621</h3>
|
||||
<h3>e621ng</h3>
|
||||
<a href="https://github.com/e621ng/e621ng/releases">
|
||||
<img src="https://img.shields.io/github/v/release/e621ng/e621ng?label=version&style=flat-square" alt="Releases" />
|
||||
</a><br />
|
||||
<a href="https://github.com/e621ng/e621ng/issues">
|
||||
<img src="https://img.shields.io/github/issues/e621ng/e621ng?label=open issues&style=flat-square" alt="Issues" />
|
||||
<img src="https://img.shields.io/github/issues/e621ng/e621ng?label=open%20issues&style=flat-square" alt="Issues" />
|
||||
</a><br />
|
||||
<a href="https://github.com/e621ng/e621ng/pulls">
|
||||
<img src="https://img.shields.io/github/issues-pr/e621ng/e621ng?style=flat-square" alt="Pull Requests" />
|
||||
@ -19,89 +19,16 @@
|
||||
<br />
|
||||
|
||||
|
||||
## Installation (Easy mode - For development environments)
|
||||
## Installation
|
||||
See [INSTALL.md](INSTALL.md) on how to install e621ng on OpenBSD.
|
||||
|
||||
### Prerequisites
|
||||
It could be possible to install this fork using Docker, but it is untested. [Docker Installation](https://git.groovyexpress.com/e621ng/e621ng/src/branch/master/README.md)
|
||||
|
||||
* Latest version of Docker ([download](https://docs.docker.com/get-docker)).
|
||||
* Latest version of Docker Compose ([download](https://docs.docker.com/compose/install))
|
||||
* Git ([download](https://git-scm.com/downloads))
|
||||
|
||||
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
|
||||
## License
|
||||
BSD-2 Licensed. See [LICENSE](LICENSE).
|
||||
|
||||
1. Download and install the [prerequisites](#prerequisites).
|
||||
1. Clone the repo with `git clone https://github.com/e621ng/e621ng.git`.
|
||||
1. `cd` into the repo.
|
||||
1. Copy the sample environment file with `cp .env.sample .env`.
|
||||
1. Run the following commands:
|
||||
```
|
||||
docker compose run --rm e621 /app/bin/setup
|
||||
docker compose up
|
||||
```
|
||||
After running the commands once only `docker compose up` is needed to bring up the containers.
|
||||
1. 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 `qwerty` respectively.
|
||||
1. By default, the site will lack any content. For testing purposes, you can generate some using the following command:
|
||||
```
|
||||
docker exec -it e621ng-e621-1 /app/bin/populate
|
||||
```
|
||||
The command can be run multiple times to generate more content.
|
||||
Environmental variables are available to customize what kind of content is generated.
|
||||
|
||||
Note: When gems or js packages are updated you need to execute `docker compose build` to reflect them in the container.
|
||||
## Security
|
||||
See [SECURITY.md](SECURITY.md).
|
||||
|
||||
### Development environment
|
||||
|
||||
This repo provides a Dev Container configuration. You can use something like the [Dev Container extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) 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.
|
||||
|
||||
#### <a id="docker-troubleshooting"></a>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.
|
||||
1. `docker compose build --no-cache` to rebuild the image from scratch.
|
||||
1. Follow the [instructions](#installation) starting from step 5.
|
||||
|
||||
#### <a id="windows-executable-bit"></a>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`
|
||||
|
||||
#### <a id="development-tools"></a>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.
|
||||
|
Loading…
Reference in New Issue
Block a user