From e0da2c55101e80be3817f07bc47c2452e98a9b13 Mon Sep 17 00:00:00 2001 From: t0is Date: Sun, 23 Feb 2025 14:25:04 +0100 Subject: [PATCH] edits --- docker-compose.yml | 3 ++- entrypoint.sh | 13 ------------- generate-docker-compose.py | 4 +++- 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100755 entrypoint.sh diff --git a/docker-compose.yml b/docker-compose.yml index 9b8a180..af832e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,7 @@ services: scanner_astatoro: + build: + context: . environment: - CHANNEL_NAME=astatoro - CHANNEL_LANGUAGE=sk @@ -7,7 +9,6 @@ services: - TIMEDELTA_DAYS_EXACT=true - TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov - TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es - image: t0is/madmonq-transcriptor-image:latest volumes: - /shared/transcriptor/clips:/app/clips - /shared/transcriptor/vods:/app/vods diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 4e39f8f..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# Get container hostname, e.g. "scanner_1", "scanner_2", etc. -HOST="$(hostname)" -# Extract the numeric suffix (assumes hostname format "scanner_N") -INDEX=$(echo "$HOST" | awk -F '-' '{print $NF}') -# Adjust to zero-index (container 1 corresponds to index 0) -INDEX_ZERO=$((INDEX - 1)) -# Read the channel name from channels.json using jq (which must be installed) -CHANNEL=$(jq -r ".[$INDEX_ZERO]" /app/channels.json) -export CHANNEL_NAME="$CHANNEL" -echo "Container $HOST using CHANNEL_NAME: $CHANNEL_NAME" -# Run the Python script -exec python main.py \ No newline at end of file diff --git a/generate-docker-compose.py b/generate-docker-compose.py index 201cac9..e738226 100644 --- a/generate-docker-compose.py +++ b/generate-docker-compose.py @@ -13,7 +13,9 @@ compose = { for channel in channels: service_name = f"scanner_{channel['name']}" compose["services"][service_name] = { - "image": "t0is/madmonq-transcriptor-image:latest", + "build": { + "context": "." + }, "environment": [ f"CHANNEL_NAME={channel['name']}", f"CHANNEL_LANGUAGE={channel['language']}",