fix
This commit is contained in:
@@ -7,7 +7,7 @@ if (!function_exists('getProxyConfiguration')) {
|
||||
function getProxyConfiguration(Server $server)
|
||||
{
|
||||
$proxy_path = config('coolify.proxy_config_path');
|
||||
if (config('app.env') === 'local') {
|
||||
if (isDev()) {
|
||||
$proxy_path = $proxy_path . '/testing-host-1/';
|
||||
}
|
||||
$networks = collect($server->standaloneDockers)->map(function ($docker) {
|
||||
@@ -77,7 +77,7 @@ if (!function_exists('getProxyConfiguration')) {
|
||||
],
|
||||
],
|
||||
];
|
||||
if (config('app.env') === 'local') {
|
||||
if (isDev()) {
|
||||
$config['services']['traefik']['command'][] = "--log.level=debug";
|
||||
}
|
||||
return Yaml::dump($config, 4, 2);
|
||||
|
||||
@@ -82,7 +82,7 @@ function set_transanctional_email_settings()
|
||||
]);
|
||||
}
|
||||
|
||||
function base_url()
|
||||
function base_url(bool $withPort = true)
|
||||
{
|
||||
$settings = InstanceSettings::get();
|
||||
if ($settings->fqdn) {
|
||||
@@ -90,10 +90,27 @@ function base_url()
|
||||
}
|
||||
$port = config('app.port');
|
||||
if ($settings->public_ipv4) {
|
||||
return "http://{$settings->public_ipv4}:{$port}";
|
||||
if ($withPort) {
|
||||
if (isDev()) {
|
||||
return "http://localhost:{$port}";
|
||||
}
|
||||
return "http://{$settings->public_ipv4}:{$port}";
|
||||
}
|
||||
if (isDev()) {
|
||||
return "http://localhost";
|
||||
}
|
||||
return "http://{$settings->public_ipv4}";
|
||||
}
|
||||
if ($settings->public_ipv6) {
|
||||
return "http://{$settings->public_ipv6}:{$port}";
|
||||
if ($withPort) {
|
||||
return "http://{$settings->public_ipv6}:{$port}";
|
||||
}
|
||||
return "http://{$settings->public_ipv6}";
|
||||
}
|
||||
return url('/');
|
||||
}
|
||||
|
||||
function isDev()
|
||||
{
|
||||
return config('app.env') === 'local';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user