videoDownloadTGbot/docker-compose.yml
vrubelroman b3550f4aaf
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 1m45s
fix(cookies): mount youtube/instagram cookies from host instead of baking into image
Cookies baked into the image (COPY . .) required a full CI/CD rebuild
to refresh, incompatible with the cron job on the fedora machine that
re-extracts cookies from a logged-in browser every 20 minutes and
scp's them to prod. Volume-mount the cookies file instead — yt-dlp
reads it from disk per request, so a fresh scp takes effect
immediately with no container restart. The image-baked copy still
exists as a build-time fallback.

Also refresh the committed cookies snapshot (the cron's source yt-dlp
turned out to be missing on the fedora box, so prior commits had been
carrying years-stale cookies without anyone noticing).
2026-06-30 22:02:14 +00:00

99 lines
2.9 KiB
YAML

services:
bot:
build: .
image: 192.168.8.174:3000/vrubel/video-bot:latest
container_name: video_download_bot
restart: unless-stopped
env_file:
- .env
environment:
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
- TELEGRAM_BOT_USERNAME=${TELEGRAM_BOT_USERNAME}
- YOUTUBE_DOWNLOADER_URL=${YOUTUBE_DOWNLOADER_URL}
- INSTAGRAM_DOWNLOADER_URL=${INSTAGRAM_DOWNLOADER_URL}
- VK_DOWNLOADER_URL=${VK_DOWNLOADER_URL}
- YAPFILES_DOWNLOADER_URL=${YAPFILES_DOWNLOADER_URL}
- TIKTOK_DOWNLOADER_URL=${TIKTOK_DOWNLOADER_URL}
- ADMIN_BOT_TOKEN=${ADMIN_BOT_TOKEN}
volumes:
- ./video:/app/video
- ./data:/app/data:Z
network_mode: host
command: python bot.py
admin_bot:
build: .
image: 192.168.8.174:3000/vrubel/video-admin-bot:latest
container_name: admin_bot
restart: unless-stopped
env_file:
- .env
environment:
- ADMIN_BOT_TOKEN=${ADMIN_BOT_TOKEN}
volumes:
- ./data:/app/data:Z
network_mode: host
command: python admin_bot.py
youtube-downloader:
build: ./youtube-downloader
image: 192.168.8.174:3000/vrubel/video-youtube:latest
container_name: youtube_downloader_service
restart: unless-stopped
volumes:
- ./youtube-downloader/downloads:/app/downloads
- ./youtube-downloader/youtube_cookies.txt:/app/youtube_cookies.txt
environment:
- YOUTUBE_COOKIES_FILE=/app/youtube_cookies.txt
- PORT=5557
network_mode: host
instagram-downloader:
build: ./instagram-downloader
image: 192.168.8.174:3000/vrubel/video-instagram:latest
container_name: instagram_downloader_service
restart: unless-stopped
network_mode: host
volumes:
- ./instagram-downloader/downloads:/app/downloads
- ./instagram-downloader/instagram_cookies.txt:/app/instagram_cookies.txt
environment:
- INSTAGRAM_COOKIES_FILE=/app/instagram_cookies.txt
- PORT=5556
vk-downloader:
build: ./vk-downloader
image: 192.168.8.174:3000/vrubel/video-vk:latest
container_name: vk_downloader_service
restart: unless-stopped
network_mode: host
volumes:
- ./vk-downloader/downloads:/app/downloads
environment:
- PORT=5555
- GUNICORN_WORKERS=2
- GUNICORN_THREADS=4
- GUNICORN_TIMEOUT=360
- GUNICORN_KEEP_ALIVE=5
yapfiles-downloader:
build: ./yapfiles-downloader
image: 192.168.8.174:3000/vrubel/video-yapfiles:latest
container_name: yapfiles_downloader_service
restart: unless-stopped
network_mode: host
volumes:
- ./yapfiles-downloader/downloads:/app/downloads
environment:
- PORT=5558
tiktok-downloader:
build: ./tiktok-downloader
image: 192.168.8.174:3000/vrubel/video-tiktok:latest
container_name: tiktok_downloader_service
restart: unless-stopped
network_mode: host
volumes:
- ./tiktok-downloader/downloads:/app/downloads
environment:
- PORT=5559