diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d5ed918 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-slim + +WORKDIR /app + +COPY . /app + +RUN pip install --no-cache-dir -r /app/requirements.txt + +# Run app.py when the container launches +CMD ["python", "/app/main.py"] diff --git a/README.md b/README.md index 5aebe4b..4f8677d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ It also sends a notification of items via email any items is on sale and followi ``` SCRAPER_SMTP_USER SCRAPER_SMTP_PASSWORD -SCRAPER_SMTP_USER +SCRAPER_TO_MAIL ``` It uses Google SMTP server (you have to provide google app credentials). @@ -16,5 +16,5 @@ It uses Google SMTP server (you have to provide google app credentials). Run with: ``` -python scrape.py +python main.py ``` \ No newline at end of file diff --git a/scrape.py b/main.py similarity index 96% rename from scrape.py rename to main.py index dfc0681..113d6e3 100644 --- a/scrape.py +++ b/main.py @@ -52,4 +52,4 @@ if __name__ == "__main__": if len(products_on_sale) > 0: sender = EmailSender(os.environ["SCRAPER_SMTP_USER"], os.environ["SCRAPER_SMTP_PASSWORD"]) - sender.send_email(os.environ["SCRAPER_SMTP_USER"], products_on_sale) + sender.send_email(os.environ["SCRAPER_TO_MAIL"], products_on_sale)