1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/objects/functionsDocker.php
Daniel Neto b813f528ba Update
2024-03-18 09:47:19 -03:00

36 lines
No EOL
669 B
PHP

<?php
function getDockerVarsFileName()
{
global $global;
return $global['docker_vars'];
}
function getDockerVars()
{
global $_getDockerVars;
if (!isset($_getDockerVars)) {
if (file_exists(getDockerVarsFileName())) {
$content = file_get_contents(getDockerVarsFileName());
$_getDockerVars = json_decode($content);
} else {
$_getDockerVars = false;
}
}
return $_getDockerVars;
}
function isDocker()
{
return !empty(getDockerVars());
}
function getDockerInternalURL()
{
return "http://live:8080/";
}
function getDockerStatsURL()
{
return getDockerInternalURL() . "stat";
}