Clean Up and fixing docker build
This commit is contained in:
parent
5e5b0d55a1
commit
eec6f31419
@ -3,6 +3,6 @@ WORKDIR /hafas_db
|
|||||||
COPY Hafas_Main_web.py app.py
|
COPY Hafas_Main_web.py app.py
|
||||||
RUN mkdir -p templates
|
RUN mkdir -p templates
|
||||||
COPY templates templates/.
|
COPY templates templates/.
|
||||||
RUN pip3 install Flask
|
RUN pip3 install Flask requests
|
||||||
CMD ["python3", "app.py"]
|
CMD ["python3", "app.py"]
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
@ -11,7 +11,6 @@ def index():
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
station_name = request.form.get('station_name', '')
|
station_name = request.form.get('station_name', '')
|
||||||
if station_name:
|
if station_name:
|
||||||
# Speichere den Stationsnamen im Cookie
|
|
||||||
url = f"https://dbf.finalrewind.org/{station_name}.json?version=3"
|
url = f"https://dbf.finalrewind.org/{station_name}.json?version=3"
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
|
||||||
@ -22,7 +21,7 @@ def index():
|
|||||||
resp.set_cookie('station_name', station_name)
|
resp.set_cookie('station_name', station_name)
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
if station_name: # Überprüfe, ob ein Stationsname aus dem Cookie gelesen wurde
|
if station_name:
|
||||||
url = f"https://dbf.finalrewind.org/{station_name}.json?version=3"
|
url = f"https://dbf.finalrewind.org/{station_name}.json?version=3"
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user