Initial commit: TVJ EPG script + Dockerfile

This commit is contained in:
Lyncoln
2026-01-31 22:34:41 -05:00
commit fa08ba833d
2 changed files with 89 additions and 0 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use slim Python image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy script
COPY tvj_epg.py .
# Install requests
RUN pip install --no-cache-dir requests
# Default update interval (hours)
ENV UPDATE_INTERVAL=6
# Run the script in a loop, using UPDATE_INTERVAL env variable
CMD sh -c 'while true; do \
echo "$(date) - Updating TVJ EPG..."; \
python tvj_epg.py; \
echo "$(date) - Sleeping for ${UPDATE_INTERVAL} hours..."; \
sleep $((${UPDATE_INTERVAL}*3600)); \
done'