-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (102 loc) 路 3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (102 loc) 路 3 KB
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
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
services:
bot:
container_name: beatdock
image: ghcr.io/albertgmz/beatdock:latest
build:
context: .
dockerfile: Dockerfile
depends_on:
lavalink:
condition: service_healthy
networks:
- beatdock-network
env_file: .env
restart: unless-stopped
mem_limit: 512m
pids_limit: 256
cpus: "1.0"
logging: *default-logging
healthcheck:
test:
- CMD
- node
- -e
- "const fs=require('fs');const p=process.env.HEALTHCHECK_HEARTBEAT_PATH||'/tmp/beatdock-alive';try{const s=fs.statSync(p);process.exit(Date.now()-s.mtimeMs<120000?0:1)}catch{process.exit(1)}"
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
lavalink:
container_name: beatdock-lavalink
image: ghcr.io/lavalink-devs/lavalink:4
networks:
- beatdock-network
volumes:
- ./application.yml:/opt/Lavalink/application.yml:ro
environment:
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD:-youshallnotpass}
- SPOTIFY_ENABLED=${SPOTIFY_ENABLED:-false}
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID:-}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET:-}
- JAVA_OPTS=-Xmx1g
restart: unless-stopped
mem_limit: 1.5g
pids_limit: 512
cpus: "2.0"
logging: *default-logging
healthcheck:
test: ["CMD", "/bin/bash", "-c", "echo > /dev/tcp/localhost/2333"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Mints a YouTube poToken (credential-free, same egress IP as Lavalink). Internal-only.
bgutil-provider:
container_name: beatdock-bgutil
image: brainicism/bgutil-ytdlp-pot-provider:1.3.2
init: true
networks:
- beatdock-network
restart: unless-stopped
mem_limit: 384m
pids_limit: 256
cpus: "1.0"
logging: *default-logging
# Loops: mint {poToken, visitorData} from bgutil -> push to Lavalink's POST /youtube
# hot-swap route (no restart). Restores non-music videos + autoplay/RD mixes on the WEB client.
pot-refresher:
container_name: beatdock-pot-refresher
image: alpine:3
init: true
depends_on:
lavalink:
condition: service_healthy
bgutil-provider:
condition: service_started
networks:
- beatdock-network
volumes:
# Long syntax: fail loudly if the script is missing instead of creating a junk dir.
- type: bind
source: ./scripts/pot-refresher.sh
target: /pot-refresher.sh
read_only: true
bind:
create_host_path: false
environment:
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD:-youshallnotpass}
- POT_REFRESH_INTERVAL=${POT_REFRESH_INTERVAL:-1800}
command: sh -c "apk add --no-cache curl jq >/dev/null && exec sh /pot-refresher.sh"
restart: unless-stopped
mem_limit: 64m
pids_limit: 64
cpus: "0.5"
logging: *default-logging
networks:
beatdock-network:
name: beatdock_network