ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.86k stars 5.29k forks source link

Refine docker detect mechenism. v5.0.190 v6.0.90 #3758

Closed winlinvip closed 9 months ago

winlinvip commented 11 months ago

When using Docker, logs are usually printed to console (stdout and stderr). However, since Docker detection occurs late, after log initialization, the default log output may be incorrect. In Docker, logs may still be written to a file instead of the console as expected.

Additionally, the Dockerfile has been improved with a new environment variable SRS_IN_DOCKER=on to clearly indicate a Docker environment. If automatic Docker detection fails, the configuration will be read, and this variable will correctly inform SRS that it's in a Docker environment.

Lastly, the default configuration values have been improved for Docker environments. By default, SRS_LOG_TANK=console and daemon mode is disabled.


TRANS_BY_GPT4


Co-authored-by: john hondaxiao@tencent.com

winlinvip commented 9 months ago

We need to merge into 5 and 6.

TRANS_BY_GPT4