X-Git-Url: https://git.p6c8.net/jirafeau/mojo42.git/blobdiff_plain/c6c5eb250b89da6fffea47f99f0e676fe6ca1e04..36e0d29e64f711ed170d431542cf62eeb42b96d7:/docker/docker_config.php diff --git a/docker/docker_config.php b/docker/docker_config.php new file mode 100644 index 0000000..6500588 --- /dev/null +++ b/docker/docker_config.php @@ -0,0 +1,39 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +define('JIRAFEAU_ROOT', '/www/'); +define('JIRAFEAU_CFG', JIRAFEAU_ROOT . 'lib/config.local.php'); + +require(JIRAFEAU_ROOT . 'lib/settings.php'); +require(JIRAFEAU_ROOT . 'lib/functions.php'); +require(JIRAFEAU_ROOT . 'lib/lang.php'); + +function env_2_cfg_string($cfg, $config_name, $env_name) +{ + $r = getenv($env_name, true); + if ($r === false) { + return; + } + echo("setting up '" . $env_name . "' option\n"); + $cfg[$config_name] = $r; + jirafeau_export_cfg($cfg); +} + +// TODO: lots of other options to implement +env_2_cfg_string($cfg, 'file_hash', 'FILE_HASH'); +echo("docker config done\n");