Replace the old IQDB API client with a new client for the new forked version of IQDB at https://github.com/danbooru/iqdb. Changes: * The /iqdb_queries endpoint now returns `hash` and `signature` fields. The `signature` is the full decoded Haar signature, while the `hash` is a encoded version of the signature. * The /iqdb_queries endpoint no longer returns `width` and `height` fields in the response (these were always 128x128). * We no longer need the IQDBs frontend server, now we talk to the IQDB instance directly. * We no longer send add/remove image commands to IQDB through AWS SQS, now we send them to IQDB directly. They are sent in a delayed job so that if IQDB is down, uploading images is still possible, the add image commands will just get queued up. * Fix a bug where regenerating an image's thumbnails didn't regenerate IQDB, because IQDB silently ignored add image commands when the image already existed in the database.
86 lines
2.8 KiB
Bash
86 lines
2.8 KiB
Bash
# The settings here, if defined, override the settings in config/database.yml,
|
|
# config/unicorn/unicorn.rb, config/danbooru_local_config.rb, and
|
|
# ~/.danbooru/{secret_token,session_secret_key}.
|
|
#
|
|
# `.env.$RAILS_ENV` takes precedence over .env, and .env.local takes
|
|
# precedence over .env and `.env.$RAILS_ENV`.
|
|
#
|
|
# In other words: put your shared config in .env.local, and your put
|
|
# environment-specific config in .env.development / .env.production / .env.test.
|
|
|
|
#
|
|
# Unicorn
|
|
#
|
|
|
|
# These settings only take effect when running with `bundle exec unicorn -c config/unicorn/unicorn.rb`.
|
|
|
|
# export UNICORN_ROOT="$(pwd)"
|
|
# export UNICORN_LISTEN=127.0.0.1:9000
|
|
# export UNICORN_PROCESSES=1
|
|
# export UNICORN_TIMEOUT=90
|
|
# export UNICORN_LOG="log/unicorn-${UNICORN_LISTEN}.log"
|
|
# export UNICORN_PIDFILE="$UNICORN_ROOT/tmp/pids/unicorn-${UNICORN_LISTEN}.pid"
|
|
|
|
# These only take effect if you're running unicorn as root in order to bind to
|
|
# port 80 and need to drop privileges. Reverse proxying behind nginx is a better idea.
|
|
# export UNICORN_USER=danbooru
|
|
# export UNICORN_GROUP=danbooru
|
|
|
|
#
|
|
# Database
|
|
#
|
|
|
|
# DATABASE_URL takes precedence over config/database.yml if defined.
|
|
|
|
# Put these in .env.production or .env.development to define your dev/prod
|
|
# databases. Do not define it in .env or .env.local! It will be taken as your
|
|
# test database too, and rails will wipe it if you run the test suite.
|
|
#
|
|
# If you are connecting to PostgreSQL via socket, omit the hostname (e.g.
|
|
# postgresql:///danbooru2)
|
|
# export DATABASE_URL="postgresql://localhost/danbooru2"
|
|
# export ARCHIVE_DATABASE_URL="postgresql://localhost/archive_development"
|
|
# export RO_DATABASE_URL="$DATABASE_URL"
|
|
|
|
# Put these in .env.test to define your test database.
|
|
# export DATABASE_URL="postgresql://localhost/danbooru2_test"
|
|
# export RO_DATABASE_URL="postgresql://localhost/danbooru2_test"
|
|
# export ARCHIVE_DATABASE_URL="postgresql://localhost/danbooru2_archive_test"
|
|
|
|
#
|
|
# Rails
|
|
#
|
|
|
|
# These take precedence over ~/.danbooru/{secret_token,session_secret_key}.
|
|
# export SECRET_TOKEN=
|
|
# export SESSION_SECRET_KEY=
|
|
|
|
# Override the normal Gemfile with another file.
|
|
# export BUNDLE_GEMFILE=
|
|
|
|
# Logs a stacktrace for each SQL query.
|
|
# export QUERY_TRACE=
|
|
|
|
#
|
|
# Danbooru
|
|
#
|
|
|
|
# These take precedence over config/danbooru_local_config.rb. Any setting in
|
|
# danbooru_default_config.rb can be defined here by prefixing it with `DANBOORU_`.
|
|
|
|
# export DANBOORU_APP_NAME=
|
|
# export DANBOORU_VERSION=
|
|
# export DANBOORU_HOSTNAME=
|
|
# export DANBOORU_PIXIV_LOGIN=
|
|
# export DANBOORU_PIXIV_PASSWORD=
|
|
# export DANBOORU_TWITTER_API_KEY=
|
|
# export DANBOORU_TWITTER_API_SECRET=
|
|
# export DANBOORU_AWS_ACCESS_KEY_ID=
|
|
# export DANBOORU_AWS_SECRET_ACCESS_KEY=
|
|
# export DANBOORU_AWS_SQS_REGION=
|
|
# export DANBOORU_CLOUDFLARE_KEY=
|
|
# export DANBOORU_CLOUDFLARE_EMAIL=
|
|
# export DANBOORU_CLOUDFLARE_ZONE=
|
|
# export DANBOORU_RECOMMENDER_KEY=
|
|
# export DANBOORU_RECOMMENDER_SERVER=
|