From 5b7b4c46177c4b42bd3922416ff4a298d251e844 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Sat, 19 Feb 2022 12:29:55 +0100 Subject: [PATCH] use poetry dependencies --- Dockerfile | 5 +++-- docker/docker-init.sh | 1 + makesite.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93ad9c9..5762248 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM nginx:1.19.0-alpine -RUN apk update && apk add bash git python3 make tzdata && rm -rf /var/cache/apk/* -RUN python3 -m pip install requests mistune pygments toml +RUN apk update && apk add bash git python3 make tzdata curl && rm -rf /var/cache/apk/* +#RUN python3 -m pip install requests mistune pygments toml +RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - COPY docker/nginx.conf /etc/nginx/nginx.conf # install locales diff --git a/docker/docker-init.sh b/docker/docker-init.sh index b0905d7..b47c085 100644 --- a/docker/docker-init.sh +++ b/docker/docker-init.sh @@ -5,6 +5,7 @@ cd / rm -rf /blog git clone https://github.com/kianby/blog.git cd /blog +poetry install make # nginx serve diff --git a/makesite.py b/makesite.py index aa95a1c..38f005b 100755 --- a/makesite.py +++ b/makesite.py @@ -53,7 +53,7 @@ locale.setlocale(locale.LC_ALL, "") # initialize markdown -class HighlightRenderer(mistune.HTMLRenderer): +class HighlightRenderer(mistune.Renderer): options = {"escape": False, "hard_wrap": True} def block_code(self, code, lang=None):