From 456cb0444816f65a6b1a6dbeb9c03a5b55b099a1 Mon Sep 17 00:00:00 2001 From: hpl Date: Mon, 25 Nov 2024 09:38:24 +0100 Subject: [PATCH] cms translucid --- config/dockers.env | 1 + dockers/translucid/Dockerfile | 20 +++++++++++ dockers/translucid/build.sh.non_utilise | 11 ++++++ dockers/translucid/docker-compose.yml | 46 +++++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 120000 config/dockers.env create mode 100644 dockers/translucid/Dockerfile create mode 100755 dockers/translucid/build.sh.non_utilise create mode 100644 dockers/translucid/docker-compose.yml diff --git a/config/dockers.env b/config/dockers.env new file mode 120000 index 0000000..2eea525 --- /dev/null +++ b/config/dockers.env @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/dockers/translucid/Dockerfile b/dockers/translucid/Dockerfile new file mode 100644 index 0000000..e2bb162 --- /dev/null +++ b/dockers/translucid/Dockerfile @@ -0,0 +1,20 @@ +# Utilisation de l'image officielle PHP avec Apache +FROM php:8.1-apache + +RUN apt-get update && apt-get install -y git + +RUN docker-php-ext-install mysqli + +RUN a2enmod rewrite + +WORKDIR /var/www/html + +RUN git clone https://github.com/simonvdfr/Translucide.git . + +RUN chown -R www-data:www-data /var/www/html + +EXPOSE 80 + +#ENV PAHEKO_DIR /var/www/paheko +#COPY dockers/paheko/config/factory_cron.sh ${PAHEKO_DIR}/ +#VOLUME [ "${PAHEKO_DIR}/users" ] diff --git a/dockers/translucid/build.sh.non_utilise b/dockers/translucid/build.sh.non_utilise new file mode 100755 index 0000000..75497e2 --- /dev/null +++ b/dockers/translucid/build.sh.non_utilise @@ -0,0 +1,11 @@ +#!/bin/bash + +KAZ_ROOT=$(cd "$(dirname $0)/../.."; pwd) +. "${KAZ_ROOT}/bin/.commonFunctions.sh" +setKazVars + +printKazMsg "\n *** Création du Dockerfile translucid" + +cd "${KAZ_ROOT}" + +docker build --no-cache -t translucid . -f dockers/translucid/Dockerfile diff --git a/dockers/translucid/docker-compose.yml b/dockers/translucid/docker-compose.yml new file mode 100644 index 0000000..b6876dd --- /dev/null +++ b/dockers/translucid/docker-compose.yml @@ -0,0 +1,46 @@ +services: + apache: + build: . + container_name: translucid-app + networks: + - translucidNet + - postfixNet + volumes: + - translucid:/var/www/html + depends_on: + - db + labels: + - "traefik.enable=true" + - "traefik.http.routers.translucid.rule=Host(`translucid.kazkouil.fr`)" + - "traefik.docker.network=translucidNet" + db: + image: mariadb:11.4 + container_name: translucid-DB + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW + restart: ${restartPolicy} + volumes: + - ./initdb.d:/docker-entrypoint-initdb.d:ro + - translucidDB:/var/lib/mysql + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + env_file: + - ../../secret/env-wpDB + networks: + - translucidNet + healthcheck: # utilisé par init-db.sh pour la créa d'orga + test: ["CMD", 'healthcheck.sh', '--su-mysql', '--connect', '--innodb_initialized'] + interval: 30s + timeout: 30s + retries: 5 + +volumes: + translucid: + translucidDB: + +networks: + translucidNet: + external: true + name: translucidNet + postfixNet: + external: true + name: postfixNet