The WildWeather Server is responsible for processing Ambient Weather files containing historic weather records form my personal weather stations.
😶🌫️ Live API 😶🌫️
See the wildweather-react project for the web UI.
This project is a standard Java Spring Boot application that uses Maven as the build tool.
| Action | Command |
|---|---|
| Build | ./mvnw clean verify |
| Run | ./mvnw spring-boot:run |
| Code Analyses | ./mvnw clean verify -P report and then ./mvnw site -P report. View the results on the Maven Site. |
| Action | Command |
|---|---|
| Run | docker compose up -d |
| Run (rebuild Docker image) | docker compose up -d --build |
| Stop | docker compose down |
Run the spring-release-build.yml Github Action.
Use the below command to build a production ready artifact.
./mvnw clean verify -P prod
The production artifact will be the wildweather-app.jar file.
See licenses.xml for license details.
A code report for SpotBugs, PMD, CPD and Jacoco can be generated using the below commands:
./mvnw clean verify -P report
./mvnw site -P report
To view the results of the code analysis open the Maven Site webpage.
See the Spring Boot application.yml configuration file.
See the .env.production file.
Note that the other .env files are used during development.
See the messages_en.properties and related files.
Note: This project comes with already generated development keys, however any production deployment should use newly generated keys.
Use openssl to create the necessary keys.
(In Windows you can use WSL to execute the commands.)
From the project root folder, run the commands in the sections below in order to generate the new keys.
mkdir -p ./keys/jwt
openssl genrsa -out ./keys/jwt/private_key.pem 2048
openssl rsa -in ./keys/jwt/private_key.pem -outform PEM -pubout -out ./keys/jwt/public_key.pem
openssl pkcs8 -topk8 -inform PEM -in ./keys/jwt/private_key.pem -outform PEM -nocrypt -out ./keys/jwt/private_key_pkcs8.pemThen copy the private_key_pkcs8.pem and public_key.pem values into the relevant JWT_PRIVATE_KEY and JWT_PUBLIC_KEY environment variables respectively in the .env.local file for development, or set it in the production container's configuration.