Bind PolyWeather services to loopback
This commit is contained in:
+2
-2
@@ -79,7 +79,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
image: ghcr.io/yangyuan-zhen/polyweather-frontend:${IMAGE_TAG:-latest}
|
image: ghcr.io/yangyuan-zhen/polyweather-frontend:${IMAGE_TAG:-latest}
|
||||||
ports:
|
ports:
|
||||||
- 3001:3000
|
- "127.0.0.1:3001:3000"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
polyweather_web:
|
polyweather_web:
|
||||||
command: python web/app.py
|
command: python web/app.py
|
||||||
@@ -104,7 +104,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
image: ghcr.io/yangyuan-zhen/polyweather-backend:${IMAGE_TAG:-latest}
|
image: ghcr.io/yangyuan-zhen/polyweather-backend:${IMAGE_TAG:-latest}
|
||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- "127.0.0.1:8000:8000"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: ${UID:-1000}:${GID:-1000}
|
user: ${UID:-1000}:${GID:-1000}
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -80,6 +80,15 @@ def test_deploy_script_retries_startup_smoke_checks():
|
|||||||
assert 'smoke_check "frontend" "https://www.polyweather.top/" 15 3 5' in script
|
assert 'smoke_check "frontend" "https://www.polyweather.top/" 15 3 5' in script
|
||||||
|
|
||||||
|
|
||||||
|
def test_docker_compose_keeps_polyweather_ports_on_loopback():
|
||||||
|
compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
assert "127.0.0.1:3001:3000" in compose
|
||||||
|
assert "127.0.0.1:8000:8000" in compose
|
||||||
|
assert "\n - 3001:3000" not in compose
|
||||||
|
assert "\n - 8000:8000" not in compose
|
||||||
|
|
||||||
|
|
||||||
def test_city_detail_builds_deb_hourly_consensus_before_peak_window():
|
def test_city_detail_builds_deb_hourly_consensus_before_peak_window():
|
||||||
source = (ROOT / "web" / "analysis_service.py").read_text(encoding="utf-8")
|
source = (ROOT / "web" / "analysis_service.py").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user