diff --git a/.travis.yml b/.travis.yml index 86393d6..0e7a6c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +notifications: + email: + - robvanderleek@gmail.com + sudo: required services: diff --git a/Dockerfile b/Dockerfile index 55ec2e8..7416942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,6 @@ COPY requirements.txt /src/requirements.txt RUN pip install -r /src/requirements.txt COPY app.py /src COPY buzz /src/buzz +COPY static /src/static +COPY templates /src/templates CMD python /src/app.py diff --git a/app.py b/app.py index 4e4ed80..9f1bdb5 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,6 @@ import os import signal -from flask import Flask +from flask import Flask, render_template from buzz import generator app = Flask(__name__) @@ -9,10 +9,8 @@ @app.route("/") def generate_buzz(): - page = '

' - page += generator.generate_buzz() - page += '

' - return page + buzz = generator.generate_buzz() + return render_template('index.html', buzz=buzz) if __name__ == "__main__": app.run(host='0.0.0.0', port=os.getenv('PORT')) diff --git a/static/background.jpg b/static/background.jpg new file mode 100644 index 0000000..3e44176 Binary files /dev/null and b/static/background.jpg differ diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..ccf27b1 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,34 @@ + + + CI/CD buzz generator + + + + + +
+

{{ buzz }}

+
+ +