forked from Ugric/cov-to-ics
Merge branch 'master' of https://git.wbell.dev/Ugric/cov-to-ics
This commit is contained in:
0
docker-compose.yml
Normal file
0
docker-compose.yml
Normal file
27
dockerfile
Normal file
27
dockerfile
Normal 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 / /
|
||||
3
main.py
3
main.py
@@ -116,6 +116,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()
|
||||
|
||||
@@ -211,4 +212,4 @@ def login_and_download():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
app.run(debug=True, host="0.0.0.0")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user