Publish EMWIN GOES data to wxalerts.org
2.1K
A Dockerized, event-driven Python script for ingesting NWS alerts from a local directory and uploading them to the WXAlerts API.
Clone the repository or create the following files in a single directory:
Dockerfileingest.pyrequirements.txtLICENSE.txt (optional, but recommended)From the project directory, run:
docker build -t wxalerts-shipper .
The container requires a volume mount to access the directory where NWS alerts are saved (e.g., SatDump’s output).
Recommended command:
docker run -d --restart=unless-stopped -v /path/to/your/EMWIN/data:/srv/goes/output/EMWIN -e AUTH_HEADER="X-API-Key: your_secret_api_key" -e DELETE_SENT="true" --name wxalerts-ingestor wxalerts-shipper
-v /path/to/your/EMWIN/data:/srv/goes/output/EMWIN
Maps your local EMWIN data directory into the container.
⚠️ Replace /path/to/your/EMWIN/data with the absolute path to your SatDump output directory.
-e AUTH_HEADER="X-API-Key: your_secret_api_key"
Pass your API key for authentication.
(Custom headers may be required depending on API requirements.)
-e DELETE_SENT="true"
Deletes files after they are successfully uploaded.
Set to false to move them to a ./sent subdirectory instead.
--restart=unless-stopped
Ensures the container automatically restarts if it crashes or after reboot.
-d
Runs the container in the background.
| Variable | Default Value | Description |
|---|---|---|
API_URL | https://api.wxalerts.org/v1/ingest | The API endpoint for ingesting alerts. |
WATCH_ROOT | /srv/goes/output/EMWIN | Directory to watch inside the container (should match your volume mount). |
WATCH_GLOB | *.txt | Glob pattern to match files for processing. |
QUIET_MS | 2000 | Wait time (ms) to ensure a file is fully written before processing. |
CONCURRENCY | 4 | Number of concurrent threads for file processing. |
DELETE_SENT | false | If true, deletes files after upload. Otherwise moves them to ARCHIVE_DIR. |
AUTH_HEADER | "" | Optional auth header (e.g., Authorization: Bearer my_token). |
RETRY_MAX | 5 | Maximum number of retries for failed API requests. |
RETRY_BASE_MS | 750 | Base time (ms) for exponential backoff during retries. |
This project is licensed under the Apache 2.0 License.
Content type
Image
Digest
sha256:e45721a30…
Size
65.6 MB
Last updated
about 1 year ago
docker pull chancellor1101/wxalerts-emwin-uploader