jitsi : variabilisation des interfaces/ports

This commit is contained in:
Gitouche 2022-02-11 14:29:04 +01:00
parent e8c190581f
commit c5b00aa9d4
2 changed files with 8 additions and 2 deletions

View file

@ -22,10 +22,11 @@ cp env.example .env
sed_in_place "^ image: jitsi/" " image: docker.io/jitsi/" docker-compose.yml sed_in_place "^ image: jitsi/" " image: docker.io/jitsi/" docker-compose.yml
sed_in_place "^ environment:" " env_file:\n - .env\n environment:" docker-compose.yml sed_in_place "^ environment:" " env_file:\n - .env\n environment:" docker-compose.yml
sed_in_place "^ - '\${JVB_TCP_PORT}:\${JVB_TCP_PORT}'" "# - '\${JVB_TCP_PORT}:\${JVB_TCP_PORT}'" docker-compose.yml sed_in_place "^ - '\${JVB_TCP_PORT}:\${JVB_TCP_PORT}'" "# - '\${JVB_TCP_PORT}:\${JVB_TCP_PORT}'" 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 "^ - '\${HTTPS_PORT}:443'" "# - '\${HTTPS_PORT}:443'" docker-compose.yml
# Patch env file # Patch env file
sed_in_place "^HTTP_PORT=8000" "HTTP_PORT=8085" .env sed_in_place "^HTTP_PORT=8000" "HTTP_PORT=${listen_port}" .env
sed_in_place "^HTTPS_PORT=8443" "#HTTPS_PORT=8443" .env sed_in_place "^HTTPS_PORT=8443" "#HTTPS_PORT=8443" .env
sed_in_place "^TZ=UTC" "TZ=Europe/Paris" .env sed_in_place "^TZ=UTC" "TZ=Europe/Paris" .env
sed_in_place "^#PUBLIC_URL=https://meet.example.com" "PUBLIC_URL=${GARBAYE_JITSI_URL}" .env sed_in_place "^#PUBLIC_URL=https://meet.example.com" "PUBLIC_URL=${GARBAYE_JITSI_URL}" .env
@ -34,7 +35,7 @@ sed_in_place "^#ENABLE_LETSENCRYPT=1" "ENABLE_LETSENCRYPT=0" .env
sed_in_place "^#ENABLE_AUTH=1" "ENABLE_AUTH=0" .env sed_in_place "^#ENABLE_AUTH=1" "ENABLE_AUTH=0" .env
sed_in_place "^XMPP_SERVER=xmpp.meet.jitsi" "XMPP_SERVER=prosody" .env sed_in_place "^XMPP_SERVER=xmpp.meet.jitsi" "XMPP_SERVER=prosody" .env
sed_in_place "^XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280" "XMPP_BOSH_URL_BASE=http://prosody:5280" .env sed_in_place "^XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280" "XMPP_BOSH_URL_BASE=http://prosody:5280" .env
sed_in_place "^JVB_PORT=10000" "JVB_PORT=8085" .env sed_in_place "^JVB_PORT=10000" "JVB_PORT=${listen_port}" .env
sed_in_place "^JVB_TCP_HARVESTER_DISABLED=true" "JVB_TCP_HARVESTER_DISABLED=false" .env sed_in_place "^JVB_TCP_HARVESTER_DISABLED=true" "JVB_TCP_HARVESTER_DISABLED=false" .env
sed_in_place "^#ENABLE_RECORDING=1" "ENABLE_RECORDING=0" .env sed_in_place "^#ENABLE_RECORDING=1" "ENABLE_RECORDING=0" .env
sed_in_place "^#DISABLE_HTTPS=1" "DISABLE_HTTPS=1" .env sed_in_place "^#DISABLE_HTTPS=1" "DISABLE_HTTPS=1" .env
@ -43,6 +44,9 @@ sed_in_place "^#ENABLE_IPV6=1" "ENABLE_IPV6=0" .env
echo "ENABLE_P2P=false" >> .env echo "ENABLE_P2P=false" >> .env
export listen_if
export listen_port
podman-compose up -d && podman pod stop ${pod_name} && echo Pod built and stopped. podman-compose up -d && podman pod stop ${pod_name} && echo Pod built and stopped.
# cleanup # cleanup

View file

@ -5,5 +5,7 @@ service_name="pod-${pod_name}.service"
upstream_images="docker.io/jitsi/jvb docker.io/jitsi/jicofo docker.io/jitsi/prosody docker.io/jitsi/web" upstream_images="docker.io/jitsi/jvb docker.io/jitsi/jicofo docker.io/jitsi/prosody docker.io/jitsi/web"
version='stable-6826' version='stable-6826'
confvolume='.jitsi-meet-cfg' confvolume='.jitsi-meet-cfg'
listen_if="${GARBAYE_JITSI_ENV_LISTENIF:-127.0.0.1}"
listen_port="${GARBAYE_JITSI_ENV_LISTENPORT:-8085}"
GARBAYE_JITSI_URL="${GARBAYE_JITSI_ENV_URL:-https://jitsi.garbaye.fr}" GARBAYE_JITSI_URL="${GARBAYE_JITSI_ENV_URL:-https://jitsi.garbaye.fr}"
get_default_iface_ipv4 GARBAYE_JITSI_PRIV_IP get_default_iface_ipv4 GARBAYE_JITSI_PRIV_IP