From c9883a66ea7cbd8cec045371181e3ecea7524d91 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 12 Aug 2022 21:01:57 +0200 Subject: [PATCH] Jitsi : gitea --- podman-jitsi/.gitlab-ci.yml | 1 + podman-jitsi/10_install.sh | 5 ++++- podman-jitsi/50_update.sh | 4 +++- .../{zz_build-images.sh => ci_build-images.sh} | 16 ++++++++-------- podman-jitsi/vars.sh | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) rename podman-jitsi/{zz_build-images.sh => ci_build-images.sh} (66%) diff --git a/podman-jitsi/.gitlab-ci.yml b/podman-jitsi/.gitlab-ci.yml index d9c976c..7d5e96c 100644 --- a/podman-jitsi/.gitlab-ci.yml +++ b/podman-jitsi/.gitlab-ci.yml @@ -7,6 +7,7 @@ jitsi: stage: test script: - cd podman-jitsi + - ./ci_build-images.sh - GARBAYE_JITSI_ENV_LISTENPORT=18085 ./10_install.sh - ./20_enable.sh - ./30_start.sh && sleep 10 diff --git a/podman-jitsi/10_install.sh b/podman-jitsi/10_install.sh index a3dacb6..1b1cd71 100755 --- a/podman-jitsi/10_install.sh +++ b/podman-jitsi/10_install.sh @@ -14,7 +14,9 @@ if [[ -d ~/${confvolume} ]]; then exit 1 fi -source ${ABSDIR}/zz_build-images.sh +for image in ${upstream_images}; do + podman image pull ${image}:${version} +done && mkdir -p ~/${confvolume}/{web/letsencrypt,web/crontabs,transcripts,prosody/config,prosody/prosody-plugins-custom,jicofo,jvb,jigasi,jibri} @@ -37,6 +39,7 @@ cp env.example .env ./gen-passwords.sh # Patch docker-compose.yml +sed_in_place "image: jitsi/" "image: git-garbaye.fr/garbaye/jitsi-" docker-compose.yml sed_in_place "^ - '\${HTTP_PORT}:80'" " - '\${listen_if}:\${HTTP_PORT}:80'" docker-compose.yml sed_in_place "^ - '\${HTTPS_PORT}:443'" "# - '\${HTTPS_PORT}:443'" docker-compose.yml sed_in_place "^ - '127.0.0.1:\${JVB_COLIBRI_PORT:-8080}:8080'" "# - '127.0.0.1:\${JVB_COLIBRI_PORT:-8080}:8080'" docker-compose.yml diff --git a/podman-jitsi/50_update.sh b/podman-jitsi/50_update.sh index b64645d..de229a2 100755 --- a/podman-jitsi/50_update.sh +++ b/podman-jitsi/50_update.sh @@ -13,7 +13,9 @@ ensure_systemd_unit_exists ${service_name} current_version=$(podman ps -a --format "{{.Image}}" | grep prosody | awk -F: '{print $NF}') reinstall_please () { - source ${ABSDIR}/zz_build-images.sh + for image in ${upstream_images}; do + podman image pull ${image}:${version} + done && check_pod_running ${pod_name} && ./40_stop.sh ./70_disable.sh && \ ./80_destroy.sh && \ diff --git a/podman-jitsi/zz_build-images.sh b/podman-jitsi/ci_build-images.sh similarity index 66% rename from podman-jitsi/zz_build-images.sh rename to podman-jitsi/ci_build-images.sh index 34d5bf5..1444544 100755 --- a/podman-jitsi/zz_build-images.sh +++ b/podman-jitsi/ci_build-images.sh @@ -24,21 +24,21 @@ build_base() { mkdir ${buildfolder} && curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ && { - if ! podman image exists localhost/jitsi/jvb:${version}; then + if ! podman image exists git.garbaye.fr/garbaye/jitsi-jvb:${version}; then build_base - podman build -t localhost/jitsi/jvb:${version} ${buildfolder}/jvb/ || exit -1 + podman build -t git.garbaye.fr/garbaye/jitsi-jvb:${version} ${buildfolder}/jvb/ || exit -1 fi - if ! podman image exists localhost/jitsi/jicofo:${version}; then + if ! podman image exists git.garbaye.fr/garbaye/jitsi-jicofo:${version}; then build_base - podman build -t localhost/jitsi/jicofo:${version} ${buildfolder}/jicofo/ || exit -1 + podman build -t git.garbaye.fr/garbaye/jitsi-jicofo:${version} ${buildfolder}/jicofo/ || exit -1 fi - if ! podman image exists localhost/jitsi/prosody:${version}; then + if ! podman image exists git.garbaye.fr/garbaye/jitsi-prosody:${version}; then build_base - podman build -t localhost/jitsi/prosody:${version} ${buildfolder}/prosody/ || exit -1 + podman build -t git.garbaye.fr/garbaye/jitsi-prosody:${version} ${buildfolder}/prosody/ || exit -1 fi - if ! podman image exists localhost/jitsi/web:${version}; then + if ! podman image exists git.garbaye.fr/garbaye/jitsi-web:${version}; then build_base - podman build -t localhost/jitsi/web:${version} ${buildfolder}/web/ || exit -1 + podman build -t git.garbaye.fr/garbaye/jitsi-web:${version} ${buildfolder}/web/ || exit -1 fi dangling_images=$(podman images -f "dangling=true" -q) test ! -z ${dangling_images} && podman rmi -f "${dangling_images}" diff --git a/podman-jitsi/vars.sh b/podman-jitsi/vars.sh index 17dab98..bf84fc6 100644 --- a/podman-jitsi/vars.sh +++ b/podman-jitsi/vars.sh @@ -2,7 +2,7 @@ pod_name='podman-jitsi' service_name="pod-${pod_name}.service" -upstream_images="localhost/jitsi/jvb localhost/jitsi/jicofo localhost/jitsi/prosody localhost/jitsi/web" +upstream_images="git.garbaye.fr/garbaye/jitsi-jvb git.garbaye.fr/garbaye/jitsi-jicofo git.garbaye.fr/garbaye/jitsi-prosody git.garbaye.fr/garbaye/jitsi-web" version='stable-7577-2' confvolume='.jitsi-meet-cfg' listen_if="${GARBAYE_JITSI_ENV_LISTENIF:-127.0.0.1}"