From 684deaed350c181bce8889405b296a0a0ab96d8e Mon Sep 17 00:00:00 2001 From: Tim Chepeleff Date: Mon, 26 Jul 2021 00:43:23 -0400 Subject: [PATCH] Add Heroku Deployment Support (#159) * add heroku.yml * Use environment supplied port * Update changedetection.py --- Dockerfile | 2 +- changedetection.py | 2 +- heroku.yml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 heroku.yml diff --git a/Dockerfile b/Dockerfile index e6cd4fcd..8a0401b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxslt-dev \ zlib1g-dev \ g++ - + RUN mkdir /install WORKDIR /install diff --git a/changedetection.py b/changedetection.py index c6461b62..eb79f8da 100755 --- a/changedetection.py +++ b/changedetection.py @@ -14,7 +14,7 @@ from backend import store def main(argv): ssl_mode = False - port = 5000 + port = os.environ.get('PORT') or 5000 do_cleanup = False # Must be absolute so that send_from_directory doesnt try to make it relative to backend/ diff --git a/heroku.yml b/heroku.yml new file mode 100644 index 00000000..31dbd9ad --- /dev/null +++ b/heroku.yml @@ -0,0 +1,5 @@ +build: + docker: + changedetection: Dockerfile +run: + changedetection: python ./changedetection.py -d /datastore