From 01ab95ebac88a618ad31c8c56233e0ce8916effe Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Sun, 6 Nov 2022 11:44:41 +0100 Subject: [PATCH] Install Poetry --- Dockerfile | 10 ++++++++-- docker/docker-init.sh | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index af8d1ff..594c296 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,14 @@ FROM nginx:1.19.0-alpine -RUN apk update && apk add bash git python3 make tzdata curl && rm -rf /var/cache/apk/* +RUN apk update && apk add bash git python3 make tzdata curl py3-pip && rm -rf /var/cache/apk/* #RUN python3 -m pip install requests mistune pygments toml -RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.2.0 python3 - + +# install poetry +export POETRY_HOME=/opt/poetry +python3 -m venv $POETRY_HOME +$POETRY_HOME/bin/pip install poetry==1.2.0 +$POETRY_HOME/bin/poetry --version + COPY docker/nginx.conf /etc/nginx/nginx.conf # install locales diff --git a/docker/docker-init.sh b/docker/docker-init.sh index 5a2db4f..3df36c9 100644 --- a/docker/docker-init.sh +++ b/docker/docker-init.sh @@ -1,16 +1,18 @@ #!/bin/bash +export POETRY_HOME=/opt/poetry + # clone and build blog cd / rm -rf /blog git clone https://github.com/kianby/blog.git cd /blog -~/.poetry/bin/poetry install -~/.poetry/bin/poetry run make +$POETRY_HOME/bin/poetry install +$POETRY_HOME/bin/poetry run make # nginx serve #nginx -g 'daemon off;' nginx # exit on change in stacosys or Git repo -~/.poetry/bin/poetry run python3 monitor.py \ No newline at end of file +$POETRY_HOME/bin/poetry run python3 monitor.py \ No newline at end of file