This commit is contained in:
Ugric
2026-01-29 23:19:48 +00:00
4 changed files with 30 additions and 1 deletions

0
docker-compose.yml Normal file
View File

27
dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM python:alpine AS builder
WORKDIR /app
COPY requirements.txt /app
RUN --mount=type=cache,target=/root/.cache/pip \
pip3 install -r requirements.txt
COPY . /app
ENTRYPOINT ["gunicorn"]
CMD ["--bind","0.0.0.0:8000","main:app"]
FROM builder as dev-envs
RUN <<EOF
apk update
apk add git
EOF
RUN <<EOF
addgroup -S docker
adduser -S --shell /bin/bash --ingroup docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /

View File

@@ -116,6 +116,7 @@ def fetch_timetable(username, password):
session = requests.Session() session = requests.Session()
session.auth = HttpNtlmAuth(username, password) session.auth = HttpNtlmAuth(username, password)
session.verify = False
r = session.get(URL) r = session.get(URL)
r.raise_for_status() r.raise_for_status()
@@ -211,4 +212,4 @@ def login_and_download():
if __name__ == "__main__": if __name__ == "__main__":
app.run(debug=True) app.run(debug=True, host="0.0.0.0")

View File

@@ -13,6 +13,7 @@ itsdangerous==2.2.0
Jinja2==3.1.6 Jinja2==3.1.6
MarkupSafe==3.0.3 MarkupSafe==3.0.3
packaging==26.0 packaging==26.0
pip_system_certs==5.3
pycparser==3.0 pycparser==3.0
pyspnego==0.12.0 pyspnego==0.12.0
pytz==2025.2 pytz==2025.2