Fix bad sed in Dockerfiles COPY
This commit is contained in:
parent
cb2552a7c3
commit
9694eb66b4
3 changed files with 12 additions and 3 deletions
|
@ -2,7 +2,7 @@ FROM python:slim
|
|||
|
||||
RUN pip install flask
|
||||
COPY /beer/beer.py /beer.py
|
||||
COPY /beer/static /static
|
||||
COPY /beer/templates /templates
|
||||
COPY /beer/static /static
|
||||
EXPOSE 5000
|
||||
|
||||
|
|
11
beer/beer.py
11
beer/beer.py
|
@ -28,9 +28,18 @@ def index(hours=None, minutes=None):
|
|||
|
||||
@app.route('/favicon.ico')
|
||||
def favicon():
|
||||
""" serve the favicon """
|
||||
""" serve default favicon """
|
||||
return send_from_directory('static', 'clock-icon.png')
|
||||
|
||||
@app.route('/favicon/<mode>')
|
||||
def favicon():
|
||||
""" serve the favicon according to the timer """
|
||||
if mode == 'beer':
|
||||
return send_from_directory('static', 'beer-icon.png')
|
||||
else:
|
||||
return send_from_directory('static', 'clock-icon.png')
|
||||
|
||||
|
||||
def main():
|
||||
""" main func """
|
||||
app.run(host='::')
|
||||
|
|
|
@ -85,7 +85,7 @@ var x = setInterval(function() {
|
|||
if (distance < 0) {
|
||||
clearInterval(x);
|
||||
document.getElementById("demo").innerHTML = "<blink>BEER TIME !</blink>";
|
||||
changeFavicon('beer-icon.png')
|
||||
changeFavicon('/favicon/beer')
|
||||
}
|
||||
}, 1000);
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue