From e8c190581f052a6b9c8ce28aa7f80f77d9069115 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 11 Feb 2022 14:02:39 +0100 Subject: [PATCH] framadate : variabilisation des interfaces/ports --- podman-framadate/10_install.sh | 5 ++++- podman-framadate/docker-compose.yml | 6 +++--- podman-framadate/docker/Dockerfile | 4 ++-- podman-framadate/vars.sh | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/podman-framadate/10_install.sh b/podman-framadate/10_install.sh index 96b7d8f..b654e78 100755 --- a/podman-framadate/10_install.sh +++ b/podman-framadate/10_install.sh @@ -26,7 +26,10 @@ SMTP_SERVER=${GARBAYE_FRAMADATE_SMTP_SERVER} EOT -export GARBAYE_FRAMADATE_FRAMADATE_VERSION="${framadate_release}" +export framadate_release +export listen_if +export listen_port + podman-compose up -d shred -u .env podman rmi $(podman images -a -q -- docker.io/library/composer) diff --git a/podman-framadate/docker-compose.yml b/podman-framadate/docker-compose.yml index 9d33344..d64b893 100644 --- a/podman-framadate/docker-compose.yml +++ b/podman-framadate/docker-compose.yml @@ -18,12 +18,12 @@ services: dockerfile: ./docker/Dockerfile context: . args: - GARBAYE_FRAMADATE_FRAMADATE_VERSION: "$GARBAYE_FRAMADATE_FRAMADATE_VERSION" - image: "framadate-app:${GARBAYE_FRAMADATE_FRAMADATE_VERSION}" + GARBAYE_FRAMADATE_FRAMADATE_VERSION: "$framadate_release" + image: "framadate-app:${framadate_release}" depends_on: - db ports: - - 127.0.0.1:8087:80 + - ${listen_if}:${listen_port}:80 environment: - ENV=prod - MYSQL_USER=framadate diff --git a/podman-framadate/docker/Dockerfile b/podman-framadate/docker/Dockerfile index 2991c02..cc9ee1e 100644 --- a/podman-framadate/docker/Dockerfile +++ b/podman-framadate/docker/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/library/php:7-apache -ARG GARBAYE_FRAMADATE_FRAMADATE_VERSION +ARG version RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq zip unzip git zlib1g-dev libicu-dev g++ default-mysql-client git RUN docker-php-ext-install intl && docker-php-ext-install pdo_mysql @@ -21,7 +21,7 @@ ENV COMPOSER_ALLOW_SUPERUSER 0 WORKDIR /var/www/framadate -RUN git clone -b $GARBAYE_FRAMADATE_FRAMADATE_VERSION --depth=1 https://framagit.org/framasoft/framadate/framadate.git . +RUN git clone -b $version --depth=1 https://framagit.org/framasoft/framadate/framadate.git . RUN chown -R 33:33 . # Some Apache and PHP configuration diff --git a/podman-framadate/vars.sh b/podman-framadate/vars.sh index d522787..fd08657 100644 --- a/podman-framadate/vars.sh +++ b/podman-framadate/vars.sh @@ -4,10 +4,11 @@ pod_name='podman-framadate' service_name="pod-${pod_name}.service" framadate_release='1.1.19' dbvolume='podman-framadate_framadate-db' +listen_if="${GARBAYE_FRAMADATE_ENV_LISTENIF:-127.0.0.1}" +listen_port="${GARBAYE_FRAMADATE_ENV_LISTENPORT:-8087}" GARBAYE_FRAMADATE_APP_NAME="${GARBAYE_FRAMADATE_ENV_APP_NAME:-Framadate Garbaye}" GARBAYE_FRAMADATE_DOMAIN="${GARBAYE_FRAMADATE_ENV_DOMAIN:-sondage.garbaye.fr}" GARBAYE_FRAMADATE_ADMIN_MAIL="${GARBAYE_FRAMADATE_ENV_ADMIN_MAIL:-contact-framadate@garbaye.fr}" get_default_iface_ipv4 GARBAYE_FRAMADATE_SMTP_SERVER -GARBAYE_FRAMADATE_FRAMADATE_VERSION=${framadate_version} envvars='GARBAYE_FRAMADATE_ADMIN_PASSWORD GARBAYE_FRAMADATE_MYSQL_ROOT_PASSWORD GARBAYE_FRAMADATE_MYSQL_PASSWORD' upstream_images='localhost/framadate-app docker.io/library/composer docker.io/library/mysql docker.io/library/php docker.io/library/composer'