From 908923f488f198f1171b4821c7f7286062456a2d Mon Sep 17 00:00:00 2001 From: hpl Date: Thu, 4 Jul 2024 10:44:55 +0200 Subject: [PATCH] init docker paheko --- dockers/paheko2/.env | 1 + dockers/paheko2/config/config.local.php | 99 ++++++++++++++ dockers/paheko2/config/config.local.tmpl.php | 129 ++++++++++++++++++ dockers/paheko2/config/factory_cron.sh | 17 +++ dockers/paheko2/config/factory_cron_emails.sh | 14 ++ dockers/paheko2/config/facturation.tar.gz | Bin 0 -> 231964 bytes dockers/paheko2/config/paheko.conf | 26 ++++ dockers/paheko2/config/setupWebRights.sh | 3 + dockers/paheko2/docker-compose.yml | 41 ++++++ dockers/paheko2/docker-compose.yml~ | 41 ++++++ 10 files changed, 371 insertions(+) create mode 120000 dockers/paheko2/.env create mode 100644 dockers/paheko2/config/config.local.php create mode 100644 dockers/paheko2/config/config.local.tmpl.php create mode 100755 dockers/paheko2/config/factory_cron.sh create mode 100755 dockers/paheko2/config/factory_cron_emails.sh create mode 100644 dockers/paheko2/config/facturation.tar.gz create mode 100644 dockers/paheko2/config/paheko.conf create mode 100755 dockers/paheko2/config/setupWebRights.sh create mode 100644 dockers/paheko2/docker-compose.yml create mode 100644 dockers/paheko2/docker-compose.yml~ diff --git a/dockers/paheko2/.env b/dockers/paheko2/.env new file mode 120000 index 0000000..406acd1 --- /dev/null +++ b/dockers/paheko2/.env @@ -0,0 +1 @@ +../../config/dockers.env \ No newline at end of file diff --git a/dockers/paheko2/config/config.local.php b/dockers/paheko2/config/config.local.php new file mode 100644 index 0000000..8b70c54 --- /dev/null +++ b/dockers/paheko2/config/config.local.php @@ -0,0 +1,99 @@ +Page non trouv??e'); +} +$user_data_dir = rtrim(FACTORY_USER_DIRECTORY, '/') . '/' . $login; +if (!is_dir($user_data_dir)) { + mkdir($user_data_dir, 0700, true); + //http_response_code(404); + //die("

Cette association n'existe pas.

"); +} +// D??finir le dossier o?? sont stock??s les donn??es +define('Paheko\DATA_ROOT', $user_data_dir); +const PREFER_HTTPS = false; +const SMTP_HOST = "smtp.kazkouil.fr"; +const SMTP_USER = null; +const API_USER = "admin_kaz"; +const API_PASSWORD = "lbXyBoYdtLz2aDXlROGGXw"; +const SMTP_PASSWORD = null; +const SMTP_PORT = 25; +const SMTP_SECURITY = 'NONE'; +const ROOT = __DIR__; +const DB_FILE = DATA_ROOT . '/association.sqlite'; +#const PLUGINS_ROOT = DATA_ROOT . '/plugins'; +const PLUGINS_ROOT = __DIR__ . '/data/plugins'; + +// D??finir l'URL +//original +//define('Garradin\WWW_URL', 'https://' . $login . FACTORY_USER_DIRECTORY . '/'); +//maj kaz +define('PAHEKO\WWW_URL', "https://".$login."-paheko.kazkouil.fr/"); +define('PAHEKO\WWW_URI', '/'); +// Désactiver le log des erreurs visible dans l'interface (sécurité) +define('PAHEKO\ERRORS_ENABLE_LOG_VIEW', true); +// Ne pas afficher les erreurs de code +define('PAHEKO\SHOW_ERRORS', true); +const PDF_COMMAND = 'prince'; diff --git a/dockers/paheko2/config/config.local.tmpl.php b/dockers/paheko2/config/config.local.tmpl.php new file mode 100644 index 0000000..b2113da --- /dev/null +++ b/dockers/paheko2/config/config.local.tmpl.php @@ -0,0 +1,129 @@ +Page non trouv??e'); +} + +$user_data_dir = rtrim(FACTORY_USER_DIRECTORY, '/') . '/' . $login; + + +if (!is_dir($user_data_dir)) { + mkdir($user_data_dir, 0700, true); + //http_response_code(404); + //die("

Cette association n'existe pas.

"); +} + +// D??finir le dossier o?? sont stock??s les donn??es +define('Paheko\DATA_ROOT', $user_data_dir); + +const PREFER_HTTPS = false; +const SMTP_HOST = "__SMTP_HOST__.__DOMAIN__"; +const SMTP_USER = null; +const API_USER = "__PAHEKO_API_USER__"; +const API_PASSWORD = "__PAHEKO_API_PASSWORD__"; +const SMTP_PASSWORD = null; +const SMTP_PORT = 25; +const SMTP_SECURITY = 'NONE'; +const ROOT = __DIR__; + +const DB_FILE = DATA_ROOT . '/association.sqlite'; +//const PLUGINS_ROOT = DATA_ROOT . '/plugins'; +const PLUGINS_ROOT = __DIR__ . '/data/plugins'; + +// D??finir l'URL +//original +//define('Garradin\WWW_URL', 'https://' . $login . FACTORY_USER_DIRECTORY . '/'); +//maj kaz +define('Paheko\WWW_URL', "__HTTP_PROTO__://".$login."-paheko.__DOMAIN__/"); + +define('Paheko\WWW_URI', '/'); + +// Désactiver le log des erreurs visible dans l'interface (sécurité) +define('Paheko\ERRORS_ENABLE_LOG_VIEW', true); + +// Ne pas afficher les erreurs de code +define('Paheko\SHOW_ERRORS', true); + + +#add by fab le 21/04/2022 +//const PDF_COMMAND = 'prince'; +const PDF_COMMAND = 'auto'; diff --git a/dockers/paheko2/config/factory_cron.sh b/dockers/paheko2/config/factory_cron.sh new file mode 100755 index 0000000..05bb4ec --- /dev/null +++ b/dockers/paheko2/config/factory_cron.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# Répertoire où sont stockées les données des utilisateurs +# veiller à ce que ce soit le même que dans config.local.php +FACTORY_USER_DIRECTORY="users" + +# Chemin vers le script cron.php de Paheko +PAHEKO_CRON_SCRIPT="scripts/cron.php" + +cd /usr/share/paheko + +for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */) +do + PAHEKO_FACTORY_USER=$(basename "$user") /usr/bin/php $PAHEKO_CRON_SCRIPT + echo $PAHEKO_FACTORY_USER +done + diff --git a/dockers/paheko2/config/factory_cron_emails.sh b/dockers/paheko2/config/factory_cron_emails.sh new file mode 100755 index 0000000..eeed1b6 --- /dev/null +++ b/dockers/paheko2/config/factory_cron_emails.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Répertoire où sont stockées les données des utilisateurs +# veiller à ce que ce soit le même que dans config.local.php +FACTORY_USER_DIRECTORY="users" + +# Chemin vers le script emails.php de Paheko +PAHEKO_CRON_SCRIPT="scripts/emails.php" + +for user in $(cd ${FACTORY_USER_DIRECTORY} && ls -1d */) +do + PAHEKO_FACTORY_USER=$(basename "$user") /usr/bin/php $PAHEKO_CRON_SCRIPT + echo $PAHEKO_FACTORY_USER +done diff --git a/dockers/paheko2/config/facturation.tar.gz b/dockers/paheko2/config/facturation.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..52deac4b75f30027fc8df4a592c7e99b3e9f4b5d GIT binary patch literal 231964 zcmV(tKckiqW3`*w%KH}NlKLWMpKk5K%%&!?7;vF z*x6Ot-6_`1l~ql)2lD~@7xT83AND8sV|yYZvo1|ao&`MK3)~ow$gaFZ#^uC`$l_%0 zQr~`UbYd#EclPz^#mn>8Z(n}#tA6(JIX*n(fAQJ=cYiuN_+ol^ygxmf9ZnC9zSy5m zkMG?Le{U7=4Po7SW zqg{1YRFy$A7r8R{si~B+s?<&;MwOMlRZd%HBN~2$;in&prdD~A-F>VIb@l4q`Nban z|9e#yn421>;?$bFcJ1I&FKw=Qht#^-sD+N}rZO(#RS$${ICx%;@V zxrH>kQf1mW3n8(~N@u0JKeuS+sm0R*qT_qB#%PRsW1ZQ(`^)YJlJab&$*9FrB$%mZ z+auncpFV$cE{_lR@%zd`B~E1~n?rVGa#d7GWt2|Km7d>ytnCkt!N9wJPi+(*^nq_Z*A7zS6eo4WhChBo3NEAf1e@9`YU!#e-km=wBk@TX#) z-u;x}M=Z2V?>_Rvi=xV!R9jN3&DT1$iN*qC+zV6J#YQhXB|#N*uA;I(1{J&DQQ!SZ zlgF8AoE3>(SX2FZQm#rllUVuP-A_x%Mq&qHh9anWTKv$!?;x@IfCE+7-#Vq&g{??z zSEP+fHD*=0z5A)6$$0+kv1}vWa%teaq>a`$A%9kEjJSlhVul|YtMW(i9c^n4y2{ih zZ`9piRID3vjYkb;kWbSR8d^{L!cJsQaVLp3nt_cqP3G|$QsfJ}lmMl`aF&BS?G)#f zD_EVLIFTR5m`D5^xIf@bYf*9A?5MX@97DYEWMuobL6 z*E3<~1Y_C`axZMWG9FGyA_k9Slk3c~JJGZtl_SSUI`mP0ugq;(RJA(0`gZT_^DA;D zL9JRg)lFSwnxl5OQm4vB&G9eBK5xpD210Khwbmbz0yBid8n!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