1
0

Make ws4kp being exposed optional

This commit is contained in:
2025-11-17 08:43:12 -05:00
parent ef0ddbe778
commit cb35e05754
5 changed files with 35 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ docker-compose pull
docker-compose up
# The service runs on http://localhost:3000
# ws4kp interface available at http://localhost:8080
# WS4KP interface available at http://localhost:8080 (if port is exposed)
```
### Environment Variables
@@ -26,20 +26,25 @@ Configure ports and services via environment variables:
```bash
# Default values
PORT=3000 # Main streaming server port
WS4KP_PORT=8080 # WS4KP weather service port
MUSIC_PATH=/music # Path to music files
PORT=3000 # Main streaming server port
WS4KP_EXTERNAL_PORT=8080 # External port for WS4KP interface (optional)
MUSIC_PATH=/music # Path to music files
# Example with custom ports
PORT=8000 WS4KP_PORT=9090 docker-compose up
PORT=8000 WS4KP_EXTERNAL_PORT=9090 docker-compose up
# Run without exposing WS4KP externally (only accessible internally to the streaming app)
# Comment out the WS4KP port line in docker-compose.yml
```
Or use a `.env` file with docker-compose:
```env
PORT=8000
WS4KP_PORT=9090
WS4KP_EXTERNAL_PORT=9090
```
**Note**: The WS4KP weather service runs internally on port 8080 inside the container and is always accessible to the streaming app. The `WS4KP_EXTERNAL_PORT` controls whether it's exposed externally. If you don't need direct access to the WS4KP interface, you can comment out the WS4KP port mapping in `docker-compose.yml` to keep it internal-only.
### Persistent Geocoding Cache
Geocoding results are cached in the `./cache` directory. When using docker-compose, this directory is automatically mounted to persist between container restarts. If using Docker directly, mount the cache volume to persist data:
@@ -51,7 +56,11 @@ docker run -p 3000:3000 -p 8080:8080 -v $(pwd)/cache:/streaming-app/cache ghcr.i
### Using Docker directly
```bash
# With WS4KP interface exposed
docker run -p 3000:3000 -p 8080:8080 ghcr.io/sethwv/ws4kp-to-hls:latest
# Without exposing WS4KP interface (internal only)
docker run -p 3000:3000 ghcr.io/sethwv/ws4kp-to-hls:latest
```
**Note**: Initial build takes an additional ~90 seconds due to downloading and processing the Weatherscan music collection (~500MB, processed to VBR q6 quality with normalization).