mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-26 11:54:42 +01:00
Fix
This commit is contained in:
parent
6518c4bcb4
commit
14a9fcaf85
10
config.php
10
config.php
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user