forked from e621ng/e621ng
[Docker] Add troubleshooting steps
Setup issues pop up occasionally, and sometimes it's fixable by just redoing the build for some reason. Also some general changes, heading titles/sizes, removing outdated/useless information, formatting etc.
This commit is contained in:
parent
1dc250290c
commit
a2677fd609
37
README.md
37
README.md
@ -1,5 +1,7 @@
|
||||
## Installation (Easy mode - For development environments)
|
||||
#### Prerequisites
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* Latest version of Docker ([download](https://docs.docker.com/get-docker)). The WSL2 backend on Windows is required.
|
||||
* Latest version of Docker Compose ([download](https://docs.docker.com/compose/install))
|
||||
* Git ([download](https://git-scm.com/downloads))
|
||||
@ -7,14 +9,15 @@
|
||||
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
|
||||
### 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](https://docs.docker.com/desktop/windows/wsl/#best-practices).
|
||||
|
||||
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](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) or simply use the network address `\\wsl$`.
|
||||
|
||||
#### Installation
|
||||
1. Download and install the prerequisites.
|
||||
### Installation
|
||||
|
||||
1. Download and install the [prerequisites](#prerequisites).
|
||||
1. Clone the repo with `git clone https://github.com/zwagoth/e621ng.git`.
|
||||
1. `cd` into the repo.
|
||||
1. Copy the sample environment file with `cp .env.sample .env`.
|
||||
@ -25,25 +28,27 @@ To mitigate this you can install a WSL distribution and clone the project inside
|
||||
docker-compose up
|
||||
```
|
||||
After running the commands once only `docker-compose up` is needed to bring up the containers.
|
||||
1. 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.<br>
|
||||
By the time you get back the install will surely have completed.<sup>1</sup>
|
||||
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 `e621test` respectively.
|
||||
|
||||
Note: When gems or js packages were updated you need to execute `docker-compose build` to reflect them in the container.
|
||||
Note: When gems or js packages are updated you need to execute `docker-compose build` to reflect them in the container.
|
||||
|
||||
<sub><sup>1</sup> If the install did not finish by the time an activity is complete please select another activity to avoid crippling boredom.</sub>
|
||||
#### <a id="docker-troubleshooting"></a>I followed the above instructions but it doesn't work, what should I do?
|
||||
|
||||
#### Useful docker services
|
||||
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 6.
|
||||
|
||||
#### <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. Run it against changed files only, there are too many existing violations at the moment.
|
||||
|
||||
#### Development Database
|
||||
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 `danbooru2` with the user `danbooru`. Leave the password blank, anything will work.
|
||||
|
||||
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
|
||||
## 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.
|
||||
@ -51,7 +56,7 @@ Running a single machine install in production is possible, but is likely to be
|
||||
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
|
||||
### Production Troubleshooting
|
||||
|
||||
These instructions won't work for everyone. If your setup is not
|
||||
working, here are the steps I usually recommend to people:
|
||||
@ -70,7 +75,3 @@ correct.
|
||||
debug your Nginx configuration file.
|
||||
|
||||
4) Check all log files.
|
||||
|
||||
### IQDB Service
|
||||
|
||||
IQDB integration is delegated to the [IQDBS service](https://github.com/zwagoth/iqdbs).
|
||||
|
Loading…
Reference in New Issue
Block a user