Refactor downloader and file manager for improved rclone integration and add healthcheck and smoke test options
- Renamed download flags in ContentDownloader for clarity. - Enhanced FileManager with methods to build upload paths and verify existing files for rclone uploads. - Updated StreamProcessor to return success status for stream processing. - Added rclone smoke test and healthcheck functions to validate configuration and tool availability. - Improved environment variable handling with a utility function. - Updated TwitchArchive to incorporate new rclone verification and processing logic. - Added unit tests for new functionality and refactored existing tests for clarity and coverage. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
e92f36474a
commit
f97e0200d6
23 changed files with 1013 additions and 289 deletions
28
docker-compose.yml
Normal file
28
docker-compose.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
services:
|
||||
twitch-archive:
|
||||
image: ${TWITCH_ARCHIVE_IMAGE:-forgejo.maddoscientisto.net/maddo/twitch-archive:latest}
|
||||
container_name: ${TWITCH_ARCHIVE_CONTAINER_NAME:-twitch-archive}
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
env_file:
|
||||
- ${TWITCH_ARCHIVE_APP_ENV_FILE:-./.env.production}
|
||||
environment:
|
||||
PYTHONUNBUFFERED: ${PYTHONUNBUFFERED:-1}
|
||||
TZ: ${TZ:-UTC}
|
||||
RCLONE_CONFIG: ${TWITCH_ARCHIVE_RCLONE_CONFIG:-/app/config/rclone.conf}
|
||||
TWITCH_ARCHIVE_HEALTHCHECK_STREAMER: ${TWITCH_ARCHIVE_HEALTHCHECK_STREAMER:-vinesauce}
|
||||
command:
|
||||
- sh
|
||||
- -lc
|
||||
- python twitch-archive.py ${TWITCH_ARCHIVE_ARGS:--u vinesauce}
|
||||
volumes:
|
||||
- ${TWITCH_ARCHIVE_ARCHIVE_BIND:-./archive}:/app/archive
|
||||
- ${TWITCH_ARCHIVE_CONFIG_BIND:-./config}:/app/config
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD-SHELL
|
||||
- python twitch-archive.py --healthcheck -u ${TWITCH_ARCHIVE_HEALTHCHECK_STREAMER:-vinesauce}
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
Loading…
Add table
Add a link
Reference in a new issue