Skip to content

Commit

Permalink
Feat: update default config
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Apr 9, 2023
1 parent 23325fd commit af015e0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 36 deletions.
32 changes: 14 additions & 18 deletions .env.docker.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# SWOOLE
SWOOLE_SERVER_ADDRESS=0.0.0.0
SWOOLE_SERVER_PORT=9504
#number of concerunt threads
#increase if you have multiple long requests
SWOOLE_WORKER_NUM=1
#Compression incompatable with nginx, enable if dont use nginx
SWOOLE_HTTP_COMPRESSION=0
# HTTP SERVER
SERVER_ADDRESS=0.0.0.0
SERVER_PORT=9504

TELEGRAM_CLIENT_ADDRESS=telegram-api-server
TELEGRAM_CLIENT_PORT=9503
Expand All @@ -16,18 +11,15 @@ SELF_URL=http://127.0.0.1:9504
TIMEZONE=UTC
MEMORY_LIMIT=128M

# MAX size in bytes for media files from posts.
# 30 Mb
MAX_MEDIA_SIZE=31457280

# ACCESS CONTROL

# Allowed number of request per last 60 seconds from one IP
# Examples:
# -1 - disable RPM check.
# 0 - deny all request
# 15 - 15 requests per last 60 seconds.
RPM=15
MEDIA_RPM=45
MEDIA_RPM=50

# Allowed number of errors per minute
# Examples:
Expand Down Expand Up @@ -61,8 +53,12 @@ ONLY_PUBLIC_CHANNELS=1
FORBIDDEN_PEER_REGEX=""

# LOGS
# You can use absolete or relative dir path. No trail slash.
# Remove LOGS_FILE value to enable echo logging
# Use date format symbols with prepend '%' http://php.net/manual/function.date.php
LOGS_DIR=log
LOGS_FILE=requests.log
# LogLevel::DEBUG => 0,
# LogLevel::INFO => 1,
# LogLevel::NOTICE => 2,
# LogLevel::WARNING => 3,
# LogLevel::ERROR => 4,
# LogLevel::CRITICAL => 5,
# LogLevel::ALERT => 6,
# LogLevel::EMERGENCY => 7,
LOGS_LEVEL=2
31 changes: 13 additions & 18 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# SWOOLE
SWOOLE_SERVER_ADDRESS=127.0.0.1
SWOOLE_SERVER_PORT=9504
#number of concerunt threads
#increase if you have multiple long requests
SWOOLE_WORKER_NUM=1
#Compression incompatable with nginx, enable if dont use nginx
SWOOLE_HTTP_COMPRESSION=0
# HTTP SERVER
SERVER_ADDRESS=0.0.0.0
SERVER_PORT=9504

TELEGRAM_CLIENT_ADDRESS=127.0.0.1
TELEGRAM_CLIENT_PORT=9503
Expand All @@ -16,18 +11,14 @@ SELF_URL=http://127.0.0.1:9504
TIMEZONE=UTC
MEMORY_LIMIT=128M

# MAX size in bytes for media files from posts.
# 30 Mb
MAX_MEDIA_SIZE=31457280

# ACCESS CONTROL
# Allowed number of request per last 60 seconds from one IP
# Examples:
# -1 - disable RPM check.
# 0 - deny all request
# 15 - 15 requests per last 60 seconds.
RPM=15
MEDIA_RPM=45
MEDIA_RPM=50

# Allowed number of errors per minute
# Examples:
Expand Down Expand Up @@ -61,8 +52,12 @@ ONLY_PUBLIC_CHANNELS=1
FORBIDDEN_PEER_REGEX=""

# LOGS
# You can use absolete or relative dir path. No trail slash.
# Remove LOGS_FILE value to enable echo logging
# Use date format symbols with prepend '%' http://php.net/manual/function.date.php
LOGS_DIR=log
LOGS_FILE=%Y-%m-%d_requests.log
# LogLevel::DEBUG => 0,
# LogLevel::INFO => 1,
# LogLevel::NOTICE => 2,
# LogLevel::WARNING => 3,
# LogLevel::ERROR => 4,
# LogLevel::CRITICAL => 5,
# LogLevel::ALERT => 6,
# LogLevel::EMERGENCY => 7,
LOGS_LEVEL=2

0 comments on commit af015e0

Please sign in to comment.