add Docker entrypoint for container initialization
This commit is contained in:
parent
6c47d7f0a6
commit
a5df3133ac
@ -1,2 +1 @@
|
|||||||
/data/sync_token.txt
|
/data/
|
||||||
/data/.env
|
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
|||||||
data/sync_token.txt
|
/data/
|
||||||
data/.env
|
|
||||||
|
@ -4,4 +4,6 @@ RUN apt-get update && apt-get install -y gcc libffi-dev build-essential && rm -r
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
CMD ["python", "main.py"]
|
CMD ["python", "main.py"]
|
16
default_config.yaml
Normal file
16
default_config.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
homeserver_url: "https://example.org"
|
||||||
|
bot_user: "@MediaBot:example.org"
|
||||||
|
bot_password: "bot_password"
|
||||||
|
trusted_homeservers:
|
||||||
|
- "example.org"
|
||||||
|
command_prefix: "!media"
|
||||||
|
|
||||||
|
download_audio:
|
||||||
|
services:
|
||||||
|
youtube:
|
||||||
|
tmp_dir: "/tmp" # Директория для временных файлов
|
||||||
|
timeout: 300 # Таймаут загрузки в секундах
|
||||||
|
proxy: none # Прокси для загрузки (например: "socks5://user:pass@host:port")
|
||||||
|
enabled: true
|
||||||
|
audio_quality: 192 # Качество аудио в kbps
|
||||||
|
max_duration: 1200 # Макс. длительность в секундах
|
7
entrypoint.sh
Normal file
7
entrypoint.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Копируем дефолтный config.yaml только если его нет
|
||||||
|
if [ ! -f /app/data/config.yaml ]; then
|
||||||
|
cp /app/default_config.yaml /app/data/config.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
Loading…
x
Reference in New Issue
Block a user