forked from metabrainz/listenbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py.sample
98 lines (71 loc) · 2.67 KB
/
config.py.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
DEBUG = False # set to False in production mode
SECRET_KEY = "CHANGE_ME"
# DATABASES
# Primary database
SQLALCHEMY_DATABASE_URI = "postgresql://listenbrainz:listenbrainz@db:5432/listenbrainz"
MESSYBRAINZ_SQLALCHEMY_DATABASE_URI = "postgresql://messybrainz:messybrainz@db:5432/messybrainz"
POSTGRES_ADMIN_URI="postgresql://postgres@db/template1"
# Other postgres configuration options
# Oldest listens which can be stored in the database, in days.
MAX_POSTGRES_LISTEN_HISTORY = "-1"
# Log Postgres queries if they execeed this time, in milliseconds.
PG_QUERY_TIMEOUT = "3000"
# Set to True to enable 'synchronous_commit' for Postgres. Default: False
PG_ASYNC_LISTEN_COMMIT = False
# Redis
REDIS_HOST = "redis"
REDIS_PORT = 6379
# Influx DB (main listen store)
INFLUX_HOST = "influx"
INFLUX_PORT = 8086
INFLUX_DB_NAME = "listenbrainz"
# RabbitMQ
RABBITMQ_HOST = "rabbitmq"
RABBITMQ_PORT = 5672
RABBITMQ_USERNAME = "guest"
RABBITMQ_PASSWORD = "guest"
RABBITMQ_VHOST = "/"
# MusicBrainz OAuth
MUSICBRAINZ_CLIENT_ID = "CLIENT_ID"
MUSICBRAINZ_CLIENT_SECRET = "CLIENT_SECRET"
# Lastfm API
LASTFM_API_URL = "https://ws.audioscrobbler.com/2.0/"
LASTFM_API_KEY = "USE_LASTFM_API_KEY"
# BigQuery support
# Enable/disable support. If enabled, the Application Credentials must reside in
# bigquery-credentials.json in the top level directory.
WRITE_TO_BIGQUERY = False
BIGQUERY_PROJECT_ID = "listenbrainz"
BIGQUERY_DATASET_ID = "listenbrainz_test"
BIGQUERY_TABLE_ID = "listen"
# Stats
STATS_ENTITY_LIMIT = 100 # the number of entities to calculate at max with BQ
STATS_CALCULATE_LOGIN = 30
STATS_CALCULATION_INTERVAL = 7
# Max time in seconds after which the playing_now stream will expire.
PLAYING_NOW_MAX_DURATION = 10 * 60
# LOGGING
#LOG_FILE_ENABLED = True
#LOG_FILE = "./listenbrainz.log"
#LOG_EMAIL_ENABLED = True
#LOG_EMAIL_TOPIC = "ListenBrainz Webserver Failure"
#LOG_EMAIL_RECIPIENTS = [] # List of email addresses (strings)
#LOG_SENTRY_ENABLED = True
#SENTRY_DSN = ""
# MISCELLANEOUS
# Set to True if Less should be compiled in browser. Set to False if styling is pre-compiled.
COMPILE_LESS = True
# MAX file size to be allowed for the lastfm-backup import, default is infinite
# Size is in bytes
MAX_CONTENT_LENGTH = 16 * 1024 * 1024 # 16MB
# Specify the upload folder where all the lastfm-backup will be stored
# The path must be absolute path
UPLOAD_FOLDER = "/tmp/lastfm-backup-upload"
# Alpha importer config stuff
IMPORTER_QUEUE_KEY = 'alphaimporter:queue'
IMPORTER_SET_KEY_PREFIX = 'alphaimporter:set'
ALPHA_URL = 'https://alpha.listenbrainz.org'
BETA_URL = 'https://api.listenbrainz.org'
LISTENS_PER_GET = 100
IMPORTER_LOG_FILE = '-'
IMPORTER_DELAY = 3 # delay if requests don't return http 200