Modernize whole stack

This commit is contained in:
2022-02-21 22:10:57 +02:00
committed by Lauri Võsandi
parent 1150fc2998
commit 9e7c49884a
12 changed files with 99 additions and 119 deletions

View File

@@ -2,17 +2,13 @@
This component serves allowed list of keyfob UID hashes from MongoDB and
pushes open door commands to door controllers.
We run three instances `replica{1..3}.doorboy.infra.k-space.ee` for high availability.
To connect from door controllers use round robin record `doorboy.infra.k-space.ee`
# Testing endpoints
For manually testing something like this might help:
```
source .env
curl -f http://doorboy.infra.k-space.ee:5000/allowed -H "KEY: $DOORBOY_SECRET" | md5sum
curl -f http://127.0.0.1:5000/allowed -H "KEY: 0123456789"
```
# Test scenarios
@@ -35,19 +31,8 @@ The easiest is to obtain VM from Proxmox cluster with public IP address.
To run development instance:
```
docker-compose -f docker-compose.dev.yml up --build
docker-compose -f docker-compose.yml up --build
```
On kdoorpi override `KDOORPI_API_ALLOWED`, `KDOORPI_API_LONGPOLL` environment variables
to redirect requests to your dev instance.
# Deploying
Images are built and pushed to Docker Hub by Jenkins.
To deploy in prod adjust `DOORBOY_SECRET`, `MONGO_URI` in `.env` and proceed to launch:
```
overnode pull
overnode up
```