Skip to content

Repository files navigation

WildWeather Server

App Version GitHub License

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.

Development

Build

This project is a standard Java Spring Boot application that uses Maven as the build tool.

OpenAPI Specification

https://localhost:8080

Requirements

Maven Commands

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.

Docker Commands

Action Command
Run docker compose up -d
Run (rebuild Docker image) docker compose up -d --build
Stop docker compose down

Release

Release

Publish To GitHub Releases and Packages

Run the spring-release-build.yml Github Action.

Manual Maven Build

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.

Dependency Licenses

See licenses.xml for license details.

Code Report

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.

Configuration

Application Properties

See the Spring Boot application.yml configuration file.

Environment Variables

See the .env.production file.

Note that the other .env files are used during development.

Localisation

See the messages_en.properties and related files.

Encryption Keys

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.

JWT 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.pem

Then 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.

About

WildWeather Java Spring Boot server.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages