start working on docker

This commit is contained in:
William Bell
2026-01-29 20:48:48 +00:00
parent 6c17b6c115
commit b1e58efd6d
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

@@ -115,6 +115,7 @@ def fetch_timetable(username, password):
session = requests.Session()
session.auth = HttpNtlmAuth(username, password)
session.verify = False
r = session.get(URL)
r.raise_for_status()
@@ -195,4 +196,4 @@ def login_and_download():
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
MarkupSafe==3.0.3
packaging==26.0
pip_system_certs==5.3
pycparser==3.0
pyspnego==0.12.0
pytz==2025.2