From 827414d762c6e14b179e1a0761c8c3f29fd996e0 Mon Sep 17 00:00:00 2001 From: Slfhstd Date: Thu, 5 Mar 2026 15:54:44 +0000 Subject: [PATCH] Updates to ensure config from docker --- Dockerfile | 3 ++- bot.py | 2 +- example.env | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7e3928..56549aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,6 @@ FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -COPY . . +COPY bot.py . +COPY config.py . CMD ["python", "bot.py"] diff --git a/bot.py b/bot.py index ace2aef..bf44ad7 100644 --- a/bot.py +++ b/bot.py @@ -10,7 +10,7 @@ REDDIT_CLIENT_ID = os.environ.get('REDDIT_CLIENT_ID') REDDIT_CLIENT_SECRET = os.environ.get('REDDIT_CLIENT_SECRET') REDDIT_USERNAME = os.environ.get('REDDIT_USERNAME') REDDIT_PASSWORD = os.environ.get('REDDIT_PASSWORD') -REDDIT_USER_AGENT = os.environ.get('REDDIT_USER_AGENT', f'TestPostsBot/0.1 by {REDDIT_USERNAME}') +REDDIT_USER_AGENT = os.environ.get('REDDIT_USER_AGENT', f'TestPostsBot/0.1 on {REDDIT_USERNAME}') SUBREDDIT = os.environ.get('SUBREDDIT') WIKI_PAGE = os.environ.get('WIKI_PAGE', 'testpostsbot_config') diff --git a/example.env b/example.env index e4788cd..d5d8a0b 100644 --- a/example.env +++ b/example.env @@ -3,6 +3,6 @@ REDDIT_CLIENT_ID=your_client_id REDDIT_CLIENT_SECRET=your_client_secret REDDIT_USERNAME=your_username REDDIT_PASSWORD=your_password -REDDIT_USER_AGENT=TestPostsBot/0.1 by your_username +REDDIT_USER_AGENT=TestPostsBot/0.1 on {REDDIT_USERNAME} SUBREDDIT=your_subreddit WIKI_PAGE=testpostsbot_config