From 084502ef086ba7b756c7a2aada84605c8bce29f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mare=C5=A1=20as=20root?= Date: Sat, 16 Mar 2024 10:48:51 +0100 Subject: [PATCH] Cobuild: Move to Bookworm and venv --- cobuild/000-setup.sh | 8 ++++++++ cobuild/010-service.d/hrochobot.service | 2 +- cobuild/Dockerfile.top | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cobuild/000-setup.sh b/cobuild/000-setup.sh index ff79dbf..6693457 100644 --- a/cobuild/000-setup.sh +++ b/cobuild/000-setup.sh @@ -1,4 +1,12 @@ progress "Installing Hrochobot" +echo "Creating virtual environment" + +install-pkgs python3-venv + +python3 -m venv /srv/hrochobot +. /srv/hrochobot/bin/activate + +echo "Installing package" cd /build/src pip install . diff --git a/cobuild/010-service.d/hrochobot.service b/cobuild/010-service.d/hrochobot.service index 0149709..1bc6f40 100644 --- a/cobuild/010-service.d/hrochobot.service +++ b/cobuild/010-service.d/hrochobot.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=exec ExecStartPre=mkdir -p /data/hrochobot -ExecStart=/usr/local/bin/hrochobot +ExecStart=/srv/hrochobot/bin/hrochobot Environment=HROCHOBOT_DATA=/data/hrochobot Environment=HROCHOBOT_ETC=/data/hrochobot Environment=HROCHOBOT_LOG=/data/log diff --git a/cobuild/Dockerfile.top b/cobuild/Dockerfile.top index 6181dd4..09d2829 100644 --- a/cobuild/Dockerfile.top +++ b/cobuild/Dockerfile.top @@ -1,4 +1,4 @@ -FROM docker://registry.ks.matfyz.cz/gimli/base:bullseye +FROM docker://registry.ks.matfyz.cz/gimli/base:bookworm COPY bin /build/src/bin COPY hrochobot /build/src/hrochobot COPY setup.py /build/src