From 6740f6fa208042e6986a81d6cf5d4006e41e43ec Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Tue, 3 Mar 2020 04:47:49 +0100 Subject: Split the planet and container update The planet data and container image can be updated seperately now. The container image may not be updated as regular as the planet data. Signed-off-by: Max Magorsch --- rebuild-container.sh | 8 ++++++++ update-planet.sh | 12 ++++++++++++ update.sh | 16 ---------------- 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 rebuild-container.sh create mode 100755 update-planet.sh delete mode 100755 update.sh diff --git a/rebuild-container.sh b/rebuild-container.sh new file mode 100644 index 0000000..56d7b55 --- /dev/null +++ b/rebuild-container.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +USER=${1:-gplanet} +GROUP=${2:-gplanet} + +docker build --build-arg USER_ID=$(id -u $USER) \ + --build-arg GROUP_ID=$(id -g $GROUP) \ + -t gentoo/planet-pluto:latest . diff --git a/update-planet.sh b/update-planet.sh new file mode 100755 index 0000000..7e4792f --- /dev/null +++ b/update-planet.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +USER=${1:-gplanet} +GROUP=${2:-gplanet} + +mkdir -p htdocs data +chown -R $USER:$GROUP htdocs data + +docker run --privileged \ + --mount type=bind,source="$(pwd)"/htdocs,target=/var/www/planet.gentoo.org/build \ + --mount type=bind,source="$(pwd)"/data,target=/var/www/planet.gentoo.org/data \ + gentoo/planet-pluto:latest diff --git a/update.sh b/update.sh deleted file mode 100755 index 8ca43c3..0000000 --- a/update.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -USER=${1:gplanet} -GROUP=${2:gplanet} - -mkdir -p htdocs data -chown -R $USER:$GROUP htdocs data - -docker build --build-arg USER_ID=$(id -u $USER) \ - --build-arg GROUP_ID=$(id -g $GROUP) \ - -t gentoo/planet-pluto:latest . - -docker run --privileged \ - --mount type=bind,source="$(pwd)"/htdocs,target=/var/www/planet.gentoo.org/build \ - --mount type=bind,source="$(pwd)"/data,target=/var/www/planet.gentoo.org/data \ - gentoo/planet-pluto:latest -- cgit v1.2.3-65-gdbad