forked from PyLav/PyLav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
208 lines (183 loc) · 12.7 KB
/
docker-compose.yml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
version: '3.8'
volumes:
pgsocket:
services:
pylav:
# Read https://github.com/PhasecoreX/docker-red-discordbot#red-discordbot-v3 for more info
container_name: pylav
hostname: pylav
image: ghcr.io/drapersniper/red-discordbot:pylav
restart: unless-stopped
volumes:
- pgsocket:/var/run/postgresql # Postgres socket using Docker volume to allow access from other containers without mounting the host's filesystem (I.e use Sockets even on Windows)
- ./localtracks:/localtracks # Localtracks folder
- ./redbot:/data # Red data folder
- ./pylav:/pylav # Pylav folder
# Use the pylav.docker.yaml file from https://github.com/PyLav/PyLav/blob/develop/pylav.docker.yaml editing it as necessary.
- ./pylav.docker.yaml:/pylav/pylav.yaml # Pylav config file
environment:
TOKEN: your_bot_token_goes_here
PREFIX: '!'
TZ: Europe/London
PUID: 1000
PYLAV__DATA_FOLDER: /pylav
PYLAV__YAML_CONFIG: /pylav/pylav.yaml
PYLAV__LOCAL_TRACKS_FOLDER: /localtracks
depends_on:
- postgres # Wait for postgres container to start before starting Red
- lavalink # Wait for node container to start before starting Red
postgres:
container_name: postgres
hostname: postgres
image: postgres:14
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./pgdata:/var/lib/postgresql/data # Postgres data folder
- pgsocket:/var/run/postgresql # Postgres socket using Docker volume to allow access from other containers without mounting the host's filesystem (I.e use Sockets even on Windows)
lavalink:
hostname: lavalink
container_name: lavalink
image: drapersniper/node:latest
restart: always
volumes:
# Mount the Lavalink logs folder
- ./lavalink/logs:/opt/Lavalink/logs
# Mount the Plugin folder to avoid downloading the plugins every time the image starts up
- ./lavalink/plugins:/opt/Lavalink/plugins
# Mount this localtracks folder to the image to allow playback of media inside of '/localtracks'
- ./localtracks:/localtracks
environment:
_JAVA_OPTIONS: -Xmx4G # The highest amount of RAM which Lavalink is allowed to use
# Set this to 'true' if this is a remote node, and you need to conserve outbound traffic
SERVER_COMPRESSION_ENABLED: false
# You will likely want to set this as high as your system can handle without issues if you use localtracks
SERVER_UNDERTOW_THREADS_IO: 32 # CPU_COUNT * 2 i.e 32 for 16 core CPU
SERVER_UNDERTOW_THREADS_WORKER: 128 # CPU_COUNT * 8 i.e 128 for 16 core CPU
SPRING_MVC_ASYNC_REQUESTTIMEOUT: -1 # Disable timeout
# Configure bind address and port
SERVER_ADDRESS: 0.0.0.0 # The interface to bind to
SERVER_PORT: 2155 # The port to bind to
# Plugins to load
LAVALINK_PLUGINS_0_DEPENDENCY: com.github.TopiSenpai.LavaSrc:lavasrc-plugin:c9aac26
LAVALINK_PLUGINS_0_REPOSITORY: https://maven.topi.wtf/snapshots
LAVALINK_PLUGINS_1_DEPENDENCY: com.github.topisenpai:sponsorblock-plugin:2.0.0
LAVALINK_PLUGINS_1_REPOSITORY: https://jitpack.io
LAVALINK_PLUGINS_2_DEPENDENCY: com.dunctebot:skybot-lavalink-plugin:1.4.1
LAVALINK_PLUGINS_2_REPOSITORY: https://m2.duncte123.dev/releases
LAVALINK_PLUGINS_3_DEPENDENCY: me.rohank05:lavalink-filter-plugin:0.0.1
LAVALINK_PLUGINS_3_REPOSITORY: https://jitpack.io
LAVALINK_PLUGINS_4_DEPENDENCY: com.github.esmBot:lava-xm-plugin:v0.2.1
LAVALINK_PLUGINS_4_REPOSITORY: https://jitpack.io
# Configure built-in sources
LAVALINK_SERVER_SOURCES_BANDCAMP: true # Enable Bandcamp source
LAVALINK_SERVER_SOURCES_HTTP: true # Enable Bandcamp source
LAVALINK_SERVER_SOURCES_LOCAL: true # Enable Localtracks source
LAVALINK_SERVER_SOURCES_SOUNDCLOUD: true # Enable Soundcloud source
LAVALINK_SERVER_SOURCES_TWITCH: true # Enable Twitch source
LAVALINK_SERVER_SOURCES_VIMEO: true # Enable Vimeo source
LAVALINK_SERVER_SOURCES_YOUTUBE: true # Enable YouTube source
# Configure filters
LAVALINK_SERVER_FILTERS_CHANNELMIX: true # Enable the Channel Mix filter
LAVALINK_SERVER_FILTERS_DISTORTION: true # Enable the Distortion filter
LAVALINK_SERVER_FILTERS_EQUALIZER: true # Enable the Equalizer filter
LAVALINK_SERVER_FILTERS_KARAOKE: true # Enable the Karaoke filter
LAVALINK_SERVER_FILTERS_LOWPASS: true # Enable the Low Pass filter
LAVALINK_SERVER_FILTERS_ROTATION: true # Enable the Rotation filter
LAVALINK_SERVER_FILTERS_TIMESCALE: true # Enable the Timescale filter
LAVALINK_SERVER_FILTERS_TREMOLO: true # Enable the Tremolo filter
LAVALINK_SERVER_FILTERS_VIBRATO: true # Enable the Vibrato filter
LAVALINK_SERVER_FILTERS_VOLUME: true # Enable the Volume filter
LAVALINK_SERVER_FILTERS_ECHO: true # Enable the Echo filter
# Server configuration
LAVALINK_SERVER_BUFFERDURATIONMS: 400 # The duration of the NAS buffer. Higher values fare better against longer GC pauses. Duration <= 0 to disable JDA-NAS. Minimum of 40ms, lower values may introduce pauses.
LAVALINK_SERVER_FRAMEBUFFERDURATIONMS: 1000 # How many milliseconds of audio to keep buffered
LAVALINK_SERVER_GCWARNINGS: true
LAVALINK_SERVER_OPUSENCODINGQUALITY: 10 # Opus encoder quality. Valid values range from 0 to 10, where 10 is best quality but is the most expensive on the CPU.
LAVALINK_SERVER_PASSWORD: youshallnotpass # Authentication Password
LAVALINK_SERVER_PLAYERUPDATEINTERVAL: 30 # How frequently to send player updates to clients, in seconds
LAVALINK_SERVER_RESAMPLINGQUALITY: MEDIUM # Quality of resampling operations. Valid values are LOW, MEDIUM and HIGH, where HIGH uses the most CPU.
LAVALINK_SERVER_SOUNDCLOUDSEARCHENABLED: true # Enable SoundCloud Search
LAVALINK_SERVER_TRACKSTUCKTHRESHOLDMS: 10000 # The threshold for how long a track can be stuck. A track is stuck if does not return any audio data.
LAVALINK_SERVER_USESEEKGHOSTING: true # Seek ghosting is the effect where whilst a seek is in progress, the audio buffer is read from until empty, or until seek is ready.
LAVALINK_SERVER_YOUTUBEPLAYLISTLOADLIMIT: 100 # Number of pages at 100 each (YouTube allows 10,000 songs in a playlist, 100x100 = 10,000)
LAVALINK_SERVER_YOUTUBESEARCHENABLED: true # Enable YouTube Search
# # For multiple blocks or IP increment the number at the end of the variable i.e LAVALINK_SERVER_RATELIMIT_IPBLOCKS_1 and LAVALINK_SERVER_RATELIMIT_EXCLUDEDIPS_1
# LAVALINK_SERVER_RATELIMIT_IPBLOCKS_0: # ip block
# LAVALINK_SERVER_RATELIMIT_EXCLUDEDIPS_0: # ip which should be explicit excluded from usage by lavalink
# LAVALINK_SERVER_RATELIMIT_STRATEGY: RotatingNanoSwitch # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
# LAVALINK_SERVER_RATELIMIT_SEARCHTRIGGERSFAIL: true # Whether a search 429 should trigger marking the ip as failing
# LAVALINK_SERVER_RATELIMIT_RETRYLIMIT: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times
# # Required for avoiding all age restrictions by YouTube, some restricted videos still can be played without.
# LAVALINK_SERVER_YOUTUBECONFIG_EMAIL: # Email of Google account
# LAVALINK_SERVER_YOUTUBECONFIG_PASSWORD: # Password of Google account
# # Useful for blocking bad-actors from ip-grabbing your music node and attacking it, this way only the http proxy will be attacked
# LAVALINK_SERVER_HTTPCONFIG_PROXYHOST: # Hostname of the proxy, (ip or domain)
# LAVALINK_SERVER_HTTPCONFIG_PROXYPORT: # Proxy port, 3128 is the default for squidProxy
# LAVALINK_SERVER_HTTPCONFIG_PROXYUSER: # Optional user for basic authentication fields, leave blank if you don't use basic auth
# LAVALINK_SERVER_HTTPCONFIG_PROXYPASSWORD: # Password for basic authentication
# Configure Prometheus
METRICS_PROMETHEUS_ENABLED: false
METRICS_PROMETHEUS_ENDPOINT: /metrics
# Configure DuncteBot Plugin
PLUGINS_DUNCTEBOT_SOURCES_CLYPIT: true
PLUGINS_DUNCTEBOT_SOURCES_GETYARN: true
PLUGINS_DUNCTEBOT_SOURCES_MIXCLOUD: true
PLUGINS_DUNCTEBOT_SOURCES_OCREMIX: true
PLUGINS_DUNCTEBOT_SOURCES_PORNHUB: true
PLUGINS_DUNCTEBOT_SOURCES_REDDIT: true
PLUGINS_DUNCTEBOT_SOURCES_SOUNDGASM: true
PLUGINS_DUNCTEBOT_SOURCES_TIKTOK: true
PLUGINS_DUNCTEBOT_SOURCES_TTS: true
PLUGINS_DUNCTEBOT_TTSLANGUAGE: en-US
# Configure LavaSrc Plugin
# The Track search order (Deezer ISRC, YouTube Music ISRC, YouTube ISRC, YouTube Music Query, YouTube Query, Deezer Query, SoundCloud Query)
# For finding Apple Music and Spotify tracks
PLUGINS_LAVASRC_PROVIDERS_0: dzisrc:%ISRC%
PLUGINS_LAVASRC_PROVIDERS_1: ytmsearch:"%ISRC%"
PLUGINS_LAVASRC_PROVIDERS_2: ytsearch:"%ISRC%"
PLUGINS_LAVASRC_PROVIDERS_3: dzsearch:%QUERY%
PLUGINS_LAVASRC_PROVIDERS_4: ytmsearch:%QUERY%
PLUGINS_LAVASRC_PROVIDERS_5: ytsearch:%QUERY%
PLUGINS_LAVASRC_PROVIDERS_6: scsearch:%QUERY%
# Lavasrc deezer configuration
PLUGINS_LAVASRC_SOURCES_DEEZER: true # Enable Deezer source
# # PLUGINS_LAVASRC_DEEZER_MASTERDECRYPTIONKEY: # Leave this as it is, or fill it with the deezer key if you have it
# P.S IT IS NOT id58zow5hmqhdv24zil4znth3ywy8prt9-dizzzrlba8q4h2al0ywmhp2zg-1d5g
# Lavasrc Apple music configuration
PLUGINS_LAVASRC_SOURCES_APPLEMUSIC: true # Enable Apple Music source
PLUGINS_LAVASRC_APPLEMUSIC_COUNTRYCODE: US # the country code you want to use for filtering the artists top tracks and language. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
PLUGINS_LAVASRC_APPLEMUSIC_MEDIAAPITOKEN: # Not necessary, Can be used to bypass the auto token fetching which is likely to break again in the future
PLUGINS_LAVASRC_APPLEMUSIC_PLAYLISTLOADLIMIT: 30 # The number of pages at 300 tracks each
PLUGINS_LAVASRC_APPLEMUSIC_ALBUMLOADLIMIT: 30 # The number of pages at 300 tracks each
# Lavasrc Spotify configuration
PLUGINS_LAVASRC_SOURCES_SPOTIFY: true # Enable Spotify source
PLUGINS_LAVASRC_SPOTIFY_CLIENTID: CHANGE_ME # Your Spotify Client ID
PLUGINS_LAVASRC_SPOTIFY_CLIENTSECRET: CHANGE_ME # Your Spotify Client Secret
PLUGINS_LAVASRC_SPOTIFY_COUNTRYCODE: US # The country code you want to use for filtering the artists top tracks and language. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
PLUGINS_LAVASRC_SPOTIFY_PLAYLISTLOADLIMIT: 110 # The number of pages at 100 tracks each
PLUGINS_LAVASRC_SPOTIFY_ALBUMLOADLIMIT: 220 # The number of pages at 50 tracks each
# Lavasrc Yandex configuration
PLUGINS_LAVASRC_SOURCES_YANDEXMUSIC: false # Enable Yandex Music source
PLUGINS_LAVASRC_YANDEXMUSIC_ACCESSTOKEN: # the token used for accessing the yandex music api. See https://github.com/TopiSenpai/LavaSrc#yandex-music
# Configure Sentry
SENTRY_DSN:
SENTRY_ENVIRONMENT:
SENTRY_TAGS_PYLAVVERSION: 1.1.0
# Configure Logging
LOGGING_FILE_PATH: ./logs/
LOGGING_LEVEL_LAVALINK: INFO
LOGGING_LEVEL_ROOT: INFO
LOGGING_LOGBACK_ROLLINGPOLICY_MAXFILESIZE: 25MB
LOGGING_LOGBACK_ROLLINGPOLICY_MAXHISTORY: 7
LOGGING_LOGBACK_ROLLINGPOLICY_TOTALSIZECAP: 1GB
LOGGING_REQUEST_ENABLED: true
LOGGING_REQUEST_INCLUDECLIENTINFO: true
LOGGING_REQUEST_INCLUDEHEADERS: false
LOGGING_REQUEST_INCLUDEPAYLOAD: true
LOGGING_REQUEST_INCLUDEQUERYSTRING: true
LOGGING_REQUEST_MAXPAYLOADLENGTH: 10000