docker: add IQDB to Docker Compose file.
This commit is contained in:
@@ -21,6 +21,7 @@ version: "3.4"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
danbooru:
|
danbooru:
|
||||||
|
user: root
|
||||||
image: evazion/danbooru
|
image: evazion/danbooru
|
||||||
ports:
|
ports:
|
||||||
- "80:3000"
|
- "80:3000"
|
||||||
@@ -29,6 +30,7 @@ services:
|
|||||||
- RAILS_SERVE_STATIC_FILES=true
|
- RAILS_SERVE_STATIC_FILES=true
|
||||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||||
- DANBOORU_REDIS_URL=redis://redis:6379
|
- DANBOORU_REDIS_URL=redis://redis:6379
|
||||||
|
- DANBOORU_IQDB_URL=http://iqdb:5588
|
||||||
- DANBOORU_CANONICAL_URL=http://localhost
|
- DANBOORU_CANONICAL_URL=http://localhost
|
||||||
volumes:
|
volumes:
|
||||||
- "danbooru-images:/danbooru/public/data"
|
- "danbooru-images:/danbooru/public/data"
|
||||||
@@ -40,27 +42,45 @@ services:
|
|||||||
user: root
|
user: root
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
|
user: root
|
||||||
image: evazion/danbooru
|
image: evazion/danbooru
|
||||||
environment:
|
environment:
|
||||||
- RAILS_ENV=production
|
- RAILS_ENV=production
|
||||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||||
- DANBOORU_REDIS_URL=redis://redis:6379
|
- DANBOORU_REDIS_URL=redis://redis:6379
|
||||||
|
- DANBOORU_IQDB_URL=http://iqdb:5588
|
||||||
- DANBOORU_CANONICAL_URL=http://localhost
|
- DANBOORU_CANONICAL_URL=http://localhost
|
||||||
depends_on:
|
depends_on:
|
||||||
- danbooru
|
- danbooru
|
||||||
|
volumes:
|
||||||
|
- "danbooru-images:/danbooru/public/data"
|
||||||
command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/rails danbooru:cron"]
|
command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/rails danbooru:cron"]
|
||||||
|
|
||||||
delayed_jobs:
|
delayed_jobs:
|
||||||
|
# We need root to write temp upload files in the images directory (/danbooru/public/data)
|
||||||
|
user: root
|
||||||
image: evazion/danbooru
|
image: evazion/danbooru
|
||||||
environment:
|
environment:
|
||||||
- RAILS_ENV=production
|
- RAILS_ENV=production
|
||||||
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
- DATABASE_URL=postgresql://danbooru@postgres/danbooru
|
||||||
- DANBOORU_REDIS_URL=redis://redis:6379
|
- DANBOORU_REDIS_URL=redis://redis:6379
|
||||||
|
- DANBOORU_IQDB_URL=http://iqdb:5588
|
||||||
- DANBOORU_CANONICAL_URL=http://localhost
|
- DANBOORU_CANONICAL_URL=http://localhost
|
||||||
depends_on:
|
depends_on:
|
||||||
- danbooru
|
- danbooru
|
||||||
|
volumes:
|
||||||
|
# We need access to images so we can add/remove images to IQDB.
|
||||||
|
- "danbooru-images:/danbooru/public/data"
|
||||||
command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/delayed_job run"]
|
command: ["bash", "-c", "bin/wait-for-http http://danbooru:3000 5s && bin/delayed_job run"]
|
||||||
|
|
||||||
|
# https://github.com/danbooru/iqdb
|
||||||
|
# https://hub.docker.com/repository/docker/evazion/iqdb
|
||||||
|
iqdb:
|
||||||
|
image: evazion/iqdb
|
||||||
|
volumes:
|
||||||
|
- "iqdb-data:/iqdb/data"
|
||||||
|
command: ["http", "0.0.0.0", "5588", "/iqdb/data/iqdb.sqlite"]
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
|
|
||||||
@@ -77,3 +97,5 @@ volumes:
|
|||||||
name: danbooru-images
|
name: danbooru-images
|
||||||
danbooru-data:
|
danbooru-data:
|
||||||
name: danbooru-data
|
name: danbooru-data
|
||||||
|
iqdb-data:
|
||||||
|
name: iqdb-data
|
||||||
|
|||||||
Reference in New Issue
Block a user