diff options
author | Galen Guyer <galen@galenguyer.com> | 2020-10-31 12:05:31 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2020-10-31 12:05:31 -0400 |
commit | efab60744e7284e245bbd6266755ab3ca1a37200 (patch) | |
tree | b79c22eebbdaf16c1d800e596bc7c49a772662d2 | |
parent | 1009968ea0ca43ef1b1bc421f7694f1f70707948 (diff) |
Rename demo to poller
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Dockerfile | 10 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | config.env.py | 2 | ||||
-rw-r--r-- | poller/__init__.py (renamed from demo/__init__.py) | 0 | ||||
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | wsgi.py | 2 |
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 ." @@ -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=-"] @@ -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 @@ -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"])) |