add DeviceRegistry
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
.idea/
|
||||
keys/
|
||||
|
||||
16
IDENTITY.md
Normal file
16
IDENTITY.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Generate Private and Public RSA Key
|
||||
|
||||
OpenSSL Project is dedicated to providing a simple installation of OpenSSL for Microsoft Windows.
|
||||
[Download](https://slproweb.com/products/Win32OpenSSL.html)
|
||||
|
||||
Generate an RSA private key, of size 2048, and output it to a file named `identity_private_key.pem` in to `./keys`
|
||||
|
||||
```shell
|
||||
openssl genrsa -out identity_private_key.pem 2048
|
||||
```
|
||||
|
||||
Extract the public key from `identity_private_key.pem` from `./keys`, and output it to a file named `identity_public_key.pem` in to `./keys`
|
||||
|
||||
```shell
|
||||
openssl rsa -in identity_private_key.pem -pubout -out identity_public_key.pem
|
||||
```
|
||||
22
README.md
22
README.md
@@ -35,6 +35,28 @@ SPRING_PROFILES_ACTIVE: docker
|
||||
INFLUXDB_TOKEN: influxdbToken==
|
||||
```
|
||||
|
||||
### Device Registry
|
||||
|
||||
Store device information. GitHub [Hlæja Device Data](https://github.com/swordsteel/hlaeja-device-registry)
|
||||
|
||||
#### Environment
|
||||
|
||||
```text
|
||||
SPRING_R2DBC_URL: r2dbc:postgresql://localhost:5432/device_registry
|
||||
SPRING_R2DBC_USERBAME: services
|
||||
SPRING_R2DBC_PASSWORD: password
|
||||
JWT_PRIVATE_KEY: keys/private_key.pem
|
||||
```
|
||||
|
||||
#### Volume
|
||||
|
||||
This will allow you to mount a local private key `identity_private_key.pem` into the container. read `IDENTITY.md` for how to generate.
|
||||
|
||||
```text
|
||||
volumes:
|
||||
- ./keys/identity_private_key.pem:/app/resources/keys/private_key.pem
|
||||
```
|
||||
|
||||
## Databases
|
||||
|
||||
### InfluxDB
|
||||
|
||||
16
compose.yml
16
compose.yml
@@ -12,7 +12,7 @@ volumes:
|
||||
services:
|
||||
|
||||
device-data:
|
||||
image: hlaeja-device-data:0.1.0
|
||||
image: hlaeja-device-data:0.1.0-SNAPSHOT
|
||||
container_name: DeviceData
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@@ -23,6 +23,20 @@ services:
|
||||
ports:
|
||||
- "9020:8080"
|
||||
|
||||
device-registry:
|
||||
image: hlaeja-device-registry:0.1.0-SNAPSHOT
|
||||
container_name: DeviceRegistry
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: docker
|
||||
networks:
|
||||
- develop
|
||||
ports:
|
||||
- "9010:8080"
|
||||
# # mount a local `identity_private_key.pem` into the container.
|
||||
# volumes:
|
||||
# - ./keys/identity_private_key.pem:/app/resources/keys/private_key.pem
|
||||
|
||||
influxdb:
|
||||
image: influxdb:2.7.10-alpine
|
||||
container_name: InfluxDB
|
||||
|
||||
Reference in New Issue
Block a user