aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--Dockerfile10
-rw-r--r--README.md4
-rw-r--r--config.env.py2
-rw-r--r--poller/__init__.py (renamed from demo/__init__.py)0
-rw-r--r--requirements.txt1
-rw-r--r--wsgi.py2
7 files changed, 12 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 7e891f8..9935a5f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,6 @@ services:
install:
- "pip install -r requirements.txt"
script:
- - "pylint demo"
- - "docker build -t demo ."
+ - "pylint poller"
+ - "docker build -t poller ."
diff --git a/Dockerfile b/Dockerfile
index 194a42a..570c4ad 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,16 +1,16 @@
FROM python:3.8-alpine
MAINTAINER Galen Guyer <galen@galenguyer.com>
-RUN mkdir /opt/demo
+RUN mkdir /app
-ADD requirements.txt /opt/demo
+ADD requirements.txt /app
-WORKDIR /opt/demo
+WORKDIR /app
RUN pip install -r requirements.txt
-ADD . /opt/demo
+ADD . /app
RUN ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
-CMD ["gunicorn", "demo:APP", "--bind=0.0.0.0:8080", "--access-logfile=-"]
+CMD ["gunicorn", "poller:APP", "--bind=0.0.0.0:8080", "--access-logfile=-"]
diff --git a/README.md b/README.md
index 7919b4f..445bf35 100644
--- a/README.md
+++ b/README.md
@@ -18,10 +18,10 @@ Locally running this application should be pretty simple.
2. Install dependencies
* `pip install -r requirements.txt`
3. Run the app
- * `gunicorn demo:APP --bind=localhost:5000`
+ * `gunicorn poller:APP --bind=localhost:5000`
4. Visit localhost:5000 in your web browser.
## Linting
This demo uses pylint.
-Travis CI will automatically run pylint on commits and PRs, but you can also run pylint manually, using `pylint demo`.
+Travis CI will automatically run pylint on commits and PRs, but you can also run pylint manually, using `pylint poller`.
The pylint_quotes plugin is loaded by [the pylintrc](./.pylintrc) and will ensure standardised quotation mark formats.
diff --git a/config.env.py b/config.env.py
index e996ffa..fd7c9ac 100644
--- a/config.env.py
+++ b/config.env.py
@@ -12,6 +12,6 @@ import os
# Defaults for flask configuration
IP = os.environ.get('IP', '127.0.0.1')
PORT = os.environ.get('PORT', 5000)
-SERVER_NAME = os.environ.get('SERVER_NAME', 'localhost:5000')
+#SERVER_NAME = os.environ.get('SERVER_NAME', 'localhost:5000')
SECRET_KEY = os.environ.get('SESSION_KEY', default=''.join(secrets.token_hex(16)))
diff --git a/demo/__init__.py b/poller/__init__.py
index 86af046..86af046 100644
--- a/demo/__init__.py
+++ b/poller/__init__.py
diff --git a/requirements.txt b/requirements.txt
index 7b7f48f..4437399 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,3 +2,4 @@ Flask==1.1.2
gunicorn==20.0.4
pylint==2.6.0
pylint-quotes==0.2.1
+requests==2.24.0 \ No newline at end of file
diff --git a/wsgi.py b/wsgi.py
index a498cb4..31fc3f5 100644
--- a/wsgi.py
+++ b/wsgi.py
@@ -2,7 +2,7 @@
Primary entry point for the app
"""
-from demo import APP
+from poller import APP
if __name__ == "__main__":
APP.run(host=APP.config["IP"], port=int(APP.config["PORT"]))