From e0fd77ea54eca843e47495c7468f5bd0a8149ef6 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 11 Feb 2022 14:47:30 +0100 Subject: [PATCH] seafile : variabilisation des interfaces/ports --- podman-seafile/10_install.sh | 5 ++++- podman-seafile/docker-compose.yml | 4 ++-- podman-seafile/vars.sh | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/podman-seafile/10_install.sh b/podman-seafile/10_install.sh index fb46500..fb8faf2 100755 --- a/podman-seafile/10_install.sh +++ b/podman-seafile/10_install.sh @@ -28,7 +28,10 @@ SEAFILE_SERVER_HOSTNAME=${GARBAYE_SEAFILE_SERVER_HOSTNAME} SEAFILE_ADMIN_EMAIL=${GARBAYE_SEAFILE_ADMIN_EMAIL} EOT -export GARBAYE_SEAFILE_SEAFILE_VERSION="${seafile_release}" +export seafile_release +export listen_if +export listen_port + podman-compose up -d && \ echo -n "Waiting for seahub_settings.py " && \ while [ ! -e `get_podman_volume_path ${datavolume}`/seafile/conf/seahub_settings.py ]; do diff --git a/podman-seafile/docker-compose.yml b/podman-seafile/docker-compose.yml index 578df3c..4ec7951 100644 --- a/podman-seafile/docker-compose.yml +++ b/podman-seafile/docker-compose.yml @@ -20,10 +20,10 @@ services: - seafile-net seafile: - image: "docker.io/seafileltd/seafile-mc:${GARBAYE_SEAFILE_SEAFILE_VERSION}" + image: "docker.io/seafileltd/seafile-mc:${seafile_release}" container_name: seafile ports: - - "127.0.0.1:8082:80" + - ${listen_if}:${listen_port}:80 volumes: - seafile-data:/shared:Z environment: diff --git a/podman-seafile/vars.sh b/podman-seafile/vars.sh index 9f4703d..0b4d74c 100644 --- a/podman-seafile/vars.sh +++ b/podman-seafile/vars.sh @@ -5,6 +5,8 @@ service_name="pod-${pod_name}.service" seafile_release='8.0.8' dbvolume='podman-seafile_seafile-db' datavolume='podman-seafile_seafile-data' +listen_if="${GARBAYE_SEAFILE_ENV_LISTENIF:-127.0.0.1}" +listen_port="${GARBAYE_SEAFILE_ENV_LISTENPORT:-8082}" get_default_iface_ipv4 GARBAYE_SEAFILE_SMTP_SERVER GARBAYE_SEAFILE_SERVER_HOSTNAME="${GARBAYE_SEAFILE_ENV_SERVER_HOSTNAME:-seafile.garbaye.fr}" GARBAYE_SEAFILE_ADMIN_PASSWORD="${GARBAYE_SEAFILE_ENV_ADMIN_PASSWORD:-asecret}"