]> git.p6c8.net - jirafeau_mojo42.git/blob - docker/docker_config.php
[FEATURE] provide details for bug opening
[jirafeau_mojo42.git] / docker / docker_config.php
1 <?php
2 /*
3 * Jirafeau, your web file repository
4 * Copyright (C) 2020 Jérôme Jutteau <jerome@jutteau.fr>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 define('JIRAFEAU_ROOT', '/www/');
20 define('JIRAFEAU_CFG', JIRAFEAU_ROOT . 'lib/config.local.php');
21
22 require(JIRAFEAU_ROOT . 'lib/settings.php');
23 require(JIRAFEAU_ROOT . 'lib/functions.php');
24 require(JIRAFEAU_ROOT . 'lib/lang.php');
25
26 function env_2_cfg_string($cfg, $config_name, $env_name)
27 {
28 $r = getenv($env_name, true);
29 if ($r === false) {
30 return;
31 }
32 echo("setting up '" . $env_name . "' option\n");
33 $cfg[$config_name] = $r;
34 jirafeau_export_cfg($cfg);
35 }
36
37 // TODO: lots of other options to implement
38 env_2_cfg_string($cfg, 'file_hash', 'FILE_HASH');
39 echo("docker config done\n");

patrick-canterino.de