This commit is contained in:
Daniil Gentili 2024-07-01 12:56:29 +03:00
parent 6518c4bcb4
commit 14a9fcaf85
2 changed files with 7 additions and 7 deletions

View File

@ -60,6 +60,10 @@ $settings = [
'report_broken_media' => false, 'report_broken_media' => false,
'download_parallel_chunks' => 20, 'download_parallel_chunks' => 20,
], ],
'metrics' => [
'enable_prometheus_collection' => true, //(bool)getenv("PROMETHEUS_BIND_TO"),
'metrics_bind_to' => fromString("0.0.0.0:12345")
]
], ],
'api' => [ 'api' => [
'ip_whitelist' => array_filter( 'ip_whitelist' => array_filter(
@ -71,10 +75,6 @@ $settings = [
'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true), 'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true),
'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL') 'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL')
], ],
'metrics' => [
'enable_prometheus_collection' => (bool)getenv("PROMETHEUS_BIND_TO"),
'bind_to' => getenv("PROMETHEUS_BIND_TO") ? fromString(getenv("PROMETHEUS_BIND_TO")) : null
]
]; ];
if (empty($settings['telegram']['connection']['proxies']['\danog\MadelineProto\Stream\Proxy\SocksProxy'][0]['address'])) { if (empty($settings['telegram']['connection']['proxies']['\danog\MadelineProto\Stream\Proxy\SocksProxy'][0]['address'])) {
@ -85,4 +85,4 @@ if (empty($settings['telegram']['app_info']['api_id'])) {
throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env'); throw new InvalidArgumentException('Need to fill TELEGRAM_API_ID in .env.docker or .env');
} }
return $settings; return $settings;

View File

@ -5,7 +5,7 @@ services:
service: base-api service: base-api
ports: ports:
- "127.0.0.1:9503:9503" - "127.0.0.1:9503:9503"
- "127.0.0.1:12345:12345" - "12345:12345"
command: command:
- "-s=session" - "-s=session"
mysql: mysql:
@ -16,4 +16,4 @@ services:
- "127.0.0.1:9507:3306" - "127.0.0.1:9507:3306"
networks: networks:
default: default:
name: telegram-api-server name: telegram-api-server