zephyr
is a high-performance weather API server written in Go, using the custom binary format ndfile for data storage. It integrates an HTTP server, gRPC server, and downloader within a single binary.
- HTTP Server: Serve weather data over HTTP on customizable ports.
- gRPC Server: Provide weather data over gRPC for high-performance needs.
- Data Downloader: Automatically fetch the latest weather data from remote sources. (Requires cdo 1.9.10)
- Customizable Parameters: Select specific weather parameters to fetch and serve.
- go 1.22.3
- cdo 1.9.10 with netcdf and grib2 support (for downloading data)
Pre-built Docker images are available on GitHub Container Registry. To run zephyr
in a Docker container, use:
docker run ghcr.io/hstin-de/zephyr:latest --help
To download the newest weather data, run:
docker run -v ./data:/app/data -v ./weights:/app/weights ghcr.io/hstin-de/zephyr:latest --download
Theoretically you dont need to mount the weights directory, but it is recommended to speed up future downloads.
To start the HTTP server, run:
docker run -p 8081:8081 --pid=host -v ./data:/app/data ghcr.io/hstin-de/zephyr:latest --http
The Server will start using Preforking and will listen on port 8081. Plese note that the --pid=host
flag is required to access the host's network stack, and that your host system supports this feature.
Build zephyr
for production with:
make build-prod
That will create a binary named zephyr
in the build/
directory. Run it with --help
to see available commands and options.
--http
: Start the HTTP server (default: false)--grpc
: Start the gRPC server (default: false)--download, --dl
: Download the newest weather data (default: false)--http-port value
: HTTP server port (default: "8081")--grpc-port value
: gRPC server port (default: "50051")--params value, -p value [ --params value, -p value ]
: Parameters to fetch (default: various weather parameters)--help, -h
: Show help
zephyr
is licensed under the Apache-2.0 License. See the LICENSE file for more details.
Enjoy using zephyr
!