From 14a9fcaf8575becd7c9b8248add65527522dbdf9 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 1 Jul 2024 12:56:29 +0300 Subject: [PATCH] Fix --- config.php | 10 +++++----- docker-compose.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config.php b/config.php index 6e1db41..5af26f3 100644 --- a/config.php +++ b/config.php @@ -60,6 +60,10 @@ $settings = [ 'report_broken_media' => false, 'download_parallel_chunks' => 20, ], + 'metrics' => [ + 'enable_prometheus_collection' => true, //(bool)getenv("PROMETHEUS_BIND_TO"), + 'metrics_bind_to' => fromString("0.0.0.0:12345") + ] ], 'api' => [ 'ip_whitelist' => array_filter( @@ -71,10 +75,6 @@ $settings = [ 'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true), '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'])) { @@ -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'); } -return $settings; \ No newline at end of file +return $settings; diff --git a/docker-compose.yml b/docker-compose.yml index 2ec29a2..74eb406 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: service: base-api ports: - "127.0.0.1:9503:9503" - - "127.0.0.1:12345:12345" + - "12345:12345" command: - "-s=session" mysql: @@ -16,4 +16,4 @@ services: - "127.0.0.1:9507:3306" networks: default: - name: telegram-api-server \ No newline at end of file + name: telegram-api-server