Initial commit: TVJ EPG script + Dockerfile
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal 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'
|
||||
Reference in New Issue
Block a user