docker: update docker-compose file.
* Listen on port 3000 instead of port 80. Port 80 is prone to conflicts with other webservers. * Use the production version of the Danbooru Docker image. It's less likely to have bugs than master. * Fix the autoinstall script to work with `curl ... | sh`. * Lower PUMA_WORKERS to 1 to reduce memory usage.
This commit is contained in:
12
README.md
12
README.md
@@ -2,22 +2,20 @@
|
||||
|
||||
## Quickstart
|
||||
|
||||
Clone this repository and run `bin/danbooru` to start a basic Danbooru instance:
|
||||
Run this to start a basic Danbooru instance:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/danbooru/danbooru
|
||||
cd danbooru
|
||||
./bin/danbooru
|
||||
curl -sSL https://raw.githubusercontent.com/danbooru/danbooru/master/bin/danbooru | sh
|
||||
```
|
||||
|
||||
This will install [Docker Compose](https://docs.docker.com/compose/) and use it
|
||||
to start Danbooru. This will take several minutes and produce lots of output.
|
||||
When it's done, Danbooru will be running at http://localhost.
|
||||
to start Danbooru. When it's done, Danbooru will be running at http://localhost:3000.
|
||||
|
||||
Alternatively, if you already have Docker Compose installed, you can just do:
|
||||
|
||||
```sh
|
||||
docker-compose -f config/docker/docker-compose.simple.yaml up
|
||||
wget https://raw.githubusercontent.com/danbooru/danbooru/master/docker-compose.yaml
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Manual Installation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script starts Danbooru by installing Docker and Docker Compose, then
|
||||
# starting Danbooru in a container. Danbooru will be available at http://localhost.
|
||||
# starting Danbooru in a container. Danbooru will be available at http://localhost:3000.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
@@ -15,11 +15,11 @@
|
||||
#
|
||||
# This script is just a wrapper for that command.
|
||||
|
||||
set -euxo pipefail
|
||||
set -eux
|
||||
|
||||
# Check if program exists.
|
||||
has() {
|
||||
type -p "$1" > /dev/null
|
||||
type "$1" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Install Docker and Docker Compose if they're not installed already.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# A Docker Compose file that launches a minimal Danbooru instance. This is
|
||||
# suitable as a quick demo or for personal use, not for public-facing sites.
|
||||
#
|
||||
# This will start a Danbooru instance running on http://localhost.
|
||||
# This will start a Danbooru instance running on http://localhost:3000.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
@@ -22,28 +22,28 @@ version: "3.4"
|
||||
services:
|
||||
danbooru:
|
||||
user: root
|
||||
image: ghcr.io/danbooru/danbooru
|
||||
image: ghcr.io/danbooru/danbooru:production
|
||||
ports:
|
||||
- "80:3000"
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- RAILS_ENV=production
|
||||
- RAILS_SERVE_STATIC_FILES=true
|
||||
- PUMA_WORKERS=1
|
||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||
- DANBOORU_REDIS_URL=redis://redis:6379
|
||||
- DANBOORU_IQDB_URL=http://iqdb:5588
|
||||
- DANBOORU_CANONICAL_URL=http://localhost
|
||||
- DANBOORU_CANONICAL_URL=http://localhost:3000
|
||||
volumes:
|
||||
- "danbooru-images:/danbooru/public/data"
|
||||
tmpfs:
|
||||
- /tmp
|
||||
depends_on:
|
||||
- postgres
|
||||
command: ["bash", "-c", "bin/rails db:setup; bin/rails db:migrate && bin/rails server -b 0.0.0.0"]
|
||||
user: root
|
||||
command: ["bash", "-c", "bin/rails db:prepare && bin/rails server -b 0.0.0.0"]
|
||||
|
||||
cron:
|
||||
user: root
|
||||
image: ghcr.io/danbooru/danbooru
|
||||
image: ghcr.io/danbooru/danbooru:production
|
||||
environment:
|
||||
- RAILS_ENV=production
|
||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||
@@ -59,7 +59,7 @@ services:
|
||||
delayed_jobs:
|
||||
# We need root to write temp upload files in the images directory (/danbooru/public/data)
|
||||
user: root
|
||||
image: ghcr.io/danbooru/danbooru
|
||||
image: ghcr.io/danbooru/danbooru:production
|
||||
environment:
|
||||
- RAILS_ENV=production
|
||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||
|
||||
Reference in New Issue
Block a user