Enutrof commited on
Commit
4da78e6
·
1 Parent(s): 35d2f85

Switched to telethon bot.

Browse files
Files changed (1) hide show
  1. Dockerfile_subprocess +7 -17
Dockerfile_subprocess CHANGED
@@ -1,7 +1,7 @@
1
  # Dockerfile
2
 
3
  # Use an official Python runtime as a parent image
4
- FROM python:3.11-slim
5
 
6
  # Set environment variables
7
  ENV PYTHONDONTWRITEBYTECODE=1
@@ -27,28 +27,18 @@ COPY requirements.txt .
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
  # Copy the rest of the application's code into the container at /app
30
- # This assumes your bot script is named bot.py and is in the same directory as the Dockerfile
31
- # Adjust if your main script has a different name or is in a subdirectory.
32
  COPY . .
33
- # If your bot script is e.g. telegram_ytdlp_bot.py, use:
34
- # COPY telegram_ytdlp_bot.py .
35
- # COPY any_other_helper_files_if_any .
36
 
37
- # Expose a volume for downloads (optional, but good for persisting data)
38
  # The bot script currently uses "video_downloads/" relative to its execution path.
39
  # So, /app/video_downloads/ will be the path inside the container.
40
  VOLUME /app/video_downloads
41
 
42
- # Expose a volume for cookies (optional, for easier management)
43
  VOLUME /app/cookies
44
 
45
- # Define environment variables for configuration (these will be set at runtime)
46
- # You can set defaults here, but it's better to pass them during `docker run`
47
- # ENV TELEGRAM_BOT_TOKEN=""
48
- # ENV YOUTUBE_COOKIES_FILE_PATH="/app/cookies/youtube.txt"
49
- # ENV INSTAGRAM_COOKIES_FILE_PATH="/app/cookies/instagram.txt"
50
- # The bot script will need to be updated to use these _FILE_PATH variables
51
-
52
  # Command to run the application
53
- # Replace bot.py with the actual name of your main Python script
54
- CMD ["python", "bot_subprocess.py"]
 
1
  # Dockerfile
2
 
3
  # Use an official Python runtime as a parent image
4
+ FROM python:3.12-slim
5
 
6
  # Set environment variables
7
  ENV PYTHONDONTWRITEBYTECODE=1
 
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
  # Copy the rest of the application's code into the container at /app
30
+ # This assumes the bot script is named bot.py and is in the same directory as the Dockerfile
31
+ # Adjust if the main script has a different name or is in a subdirectory.
32
  COPY . .
 
 
 
33
 
34
+ # Expose a volume for downloads (but good for persisting data)
35
  # The bot script currently uses "video_downloads/" relative to its execution path.
36
  # So, /app/video_downloads/ will be the path inside the container.
37
  VOLUME /app/video_downloads
38
 
39
+ # Expose a volume for cookies (for easier management)
40
  VOLUME /app/cookies
41
 
 
 
 
 
 
 
 
42
  # Command to run the application
43
+ # CMD ["python", "bot_subprocess.py"]
44
+ CMD ["python", "bot_telethon.py"]