fix: raise web container open file limit

This commit is contained in:
2569718930@qq.com
2026-06-02 16:19:52 +08:00
parent 35a93cbd9e
commit 876417c5ec
2 changed files with 17 additions and 0 deletions
+4
View File
@@ -112,6 +112,10 @@ services:
ports:
- "127.0.0.1:8000:8000"
restart: unless-stopped
ulimits:
nofile:
soft: 65535
hard: 65535
user: ${UID:-1000}:${GID:-1000}
volumes:
- ${POLYWEATHER_RUNTIME_DATA_DIR:-/var/lib/polyweather}:/var/lib/polyweather
+13
View File
@@ -149,6 +149,19 @@ def test_docker_compose_keeps_polyweather_ports_on_loopback():
assert "\n - 8000:8000" not in compose
def test_web_container_raises_open_file_limit_for_sse_and_proxy_load():
compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
web_block = compose.split(" polyweather_web:", 1)[1].split(
"\nx-polyweather-base:",
1,
)[0]
assert "ulimits:" in web_block
assert "nofile:" in web_block
assert "soft: 65535" in web_block
assert "hard: 65535" in web_block
def test_city_detail_builds_deb_hourly_consensus_before_peak_window():
source = (ROOT / "web" / "analysis_service.py").read_text(encoding="utf-8")