edits
This commit is contained in:
parent
54a91ac77d
commit
e0da2c5510
@ -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
|
||||
|
@ -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
|
@ -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']}",
|
||||
|
Loading…
Reference in New Issue
Block a user