From 746baa95a605884eb6ee77e6192ab8cfded108b7 Mon Sep 17 00:00:00 2001 From: kleph Date: Fri, 14 Feb 2020 00:58:44 +0100 Subject: [PATCH] Initial import --- Dockerfile | 7 +++++++ beer.py | 17 +++++++++++++++++ static/beer.html | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 Dockerfile create mode 100755 beer.py create mode 100644 static/beer.html diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9787b9e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:slim + +RUN pip install flask +COPY beer.py /beer.py +EXPOSE 5000 + +CMD python /beer.py diff --git a/beer.py b/beer.py new file mode 100755 index 0000000..9914bad --- /dev/null +++ b/beer.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3.6 +# -*- coding:utf-8 -*- + +from flask import Flask +app = Flask(__name__) + +@app.route('/') +def index(): + with open('static/beer.html') as f: + data = f.read() + return data + +@app.route('/hello/') +def hello(phrase): + return phrase + +app.run(host='::') diff --git a/static/beer.html b/static/beer.html new file mode 100644 index 0000000..f752518 --- /dev/null +++ b/static/beer.html @@ -0,0 +1,34 @@ + +

+ + +