mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
118 lines
2.2 KiB
Plaintext
Executable File
118 lines
2.2 KiB
Plaintext
Executable File
###
|
|
# App
|
|
###
|
|
APP_ENV=production
|
|
APP_DEBUG=false
|
|
APP_KEY=
|
|
APP_TIMEZONE=UTC
|
|
APP_URL=http://localhost
|
|
APP_VERSION="4.0 Beta"
|
|
|
|
###
|
|
# Database Caching (MongoDB)
|
|
###
|
|
DB_CACHING=true
|
|
DB_CONNECTION=mongodb
|
|
DB_HOST=localhost
|
|
DB_PORT=27017
|
|
DB_DATABASE=jikan
|
|
DB_ADMIN=jikan
|
|
DB_USERNAME=
|
|
DB_PASSWORD=
|
|
|
|
###
|
|
# Database query default values
|
|
###
|
|
MAX_RESULTS_PER_PAGE=25
|
|
|
|
###
|
|
# Enable MyAnimeList Heartbeat
|
|
#
|
|
# Monitor bad requests to determine whether MyAnimeList is down
|
|
#
|
|
# Fallback once the following threshold is reached
|
|
###
|
|
SOURCE=local
|
|
SOURCE_BAD_HEALTH_THRESHOLD=10
|
|
# Recheck source availability (in seconds)
|
|
SOURCE_BAD_HEALTH_RECHECK=10
|
|
# Fail count only within specified time range (in seconds)
|
|
SOURCE_BAD_HEALTH_RANGE=30
|
|
# Max Fail stores
|
|
SOURCE_BAD_HEALTH_MAX_STORE=50
|
|
# Disable failover if the score reaches the following (0.0-1.0 values ONLY)
|
|
# e.g 0.9 means 90% successful requests to MyAnimeList
|
|
SOURCE_GOOD_HEALTH_SCORE=0.9
|
|
# Max time request is allowed to take
|
|
# https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html
|
|
SOURCE_TIMEOUT=5
|
|
|
|
###
|
|
# Caching (File, Redis, etc)
|
|
# Can be added over DB Caching
|
|
###
|
|
CACHING=false
|
|
CACHE_DRIVER=array
|
|
CACHE_METHOD=queue
|
|
|
|
# Caching TTL (in seconds) on specific endpoints
|
|
CACHE_DEFAULT_EXPIRE=86400 # 1 day
|
|
CACHE_META_EXPIRE=300 # 5 minutes
|
|
CACHE_USER_EXPIRE=300 # 5 minutes
|
|
CACHE_USERLIST_EXPIRE=3600 # 1 hour
|
|
CACHE_404_EXPIRE=604800 # 7 days
|
|
CACHE_SEARCH_EXPIRE=432000 # 5 days
|
|
CACHE_PRODUCERS_EXPIRE=432000 # 5 days
|
|
CACHE_MAGAZINES_EXPIRE=432000 # 5 days
|
|
|
|
|
|
###
|
|
# Redis Caching Configuration
|
|
###
|
|
REDIS_HOST=127.0.0.1
|
|
REDIS_PASSWORD=null
|
|
REDIS_PORT=6379
|
|
|
|
###
|
|
# Micro Caching
|
|
# Uses CACHE_DRIVER
|
|
###
|
|
MICROCACHING=false
|
|
MICROCACHING_EXPIRE=5
|
|
|
|
###
|
|
# Queue management
|
|
# Uses QUEUE_CONNECTION as queue storage (MongoDB, Redis, etc)
|
|
###
|
|
QUEUE_CONNECTION=database
|
|
QUEUE_TABLE=jobs
|
|
QUEUE_FAILED_TABLE=jobs_failed
|
|
QUEUE_DELAY_PER_JOB=5
|
|
|
|
###
|
|
# Throttling
|
|
# Rate limiting requests
|
|
###
|
|
THROTTLE=false
|
|
THROTTLE_DECAY_MINUTES=1
|
|
THROTTLE_MAX_REQUESTS_PER_DECAY_MINUTES=60
|
|
THROTTLE_MAX_REQUESTS_PER_SECOND=2
|
|
|
|
###
|
|
# GitHub generate report URL on fatal errors
|
|
###
|
|
GITHUB_REPORTING=true
|
|
GITHUB_REST="jikan-me/jikan-rest"
|
|
GITHUB_API="jikan-me/jikan"
|
|
|
|
###
|
|
# Patreon API for fetching backers
|
|
###
|
|
PATREON=false
|
|
PATREON_CLIENT_ID=
|
|
PATREON_CLIENT_SECRET=
|
|
|
|
###
|
|
# OpenAPI
|
|
###
|
|
SWAGGER_VERSION=3.0 |