Compare commits

...

3 Commits
v1.0.0 ... main

Author SHA1 Message Date
697c814648
grafana fixes 2024-06-22 17:02:19 -05:00
dda2eb921a
small thing for the client 2024-06-22 17:02:13 -05:00
085e79c7bd
update docs and docker compose 2024-06-22 17:01:55 -05:00
5 changed files with 37 additions and 5 deletions

View File

@ -7,15 +7,22 @@ curl -fsSL https://bun.sh/install | bash
To build the client:
```sh
cd client
bun install
bun run exe
```
To run the server:
```sh
cd server
bun install
# clone .env from .env.example and fill in variables
bun start
```
The provided docker-compose file sets up a PostgreSQL server and a Grafana instance.
There is also a Grafana dashboard JSON file for an example use of the data.
Make sure to import the `server/schema.sql` into PostgreSQL before using it.
You can import the datasource into grafana with the command:
```sh
curl -X "POST" "http://localhost:3000/api/datasources" -H "Content-Type: application/json" --user admin:admin --data-binary @grafana-datasource.json
```

View File

@ -8,6 +8,8 @@ import MDBReader from 'mdb-reader';
import { diff } from 'just-diff';
import { version } from './package.json';
console.log(`FDLogUp Client v${version}`);
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
@ -115,8 +117,5 @@ process.on("SIGINT", () => {
});
rl.close();
console.log(`FDLogUp Client v${version}`);
// "Upload first" option
if (process.argv[2] === '--upload') _upload();

View File

@ -27,7 +27,7 @@ services:
environment:
- GF_INSTALL_PLUGINS=orchestracities-map-panel
volumes:
- ./grafana:/var/lib/grafana
- grafana:/var/lib/grafana
volumes:
postgres:

View File

@ -846,7 +846,7 @@
"timepicker": {},
"timezone": "browser",
"title": "Field Day Contest",
"uid": "fdpbhdsbrhs74f",
"uid": "arrlfielddaycontest",
"version": 11,
"weekStart": ""
}

26
grafana-datasource.json Normal file
View File

@ -0,0 +1,26 @@
{
"id": 1,
"uid": "edpbbm8hqv9j4e",
"orgId": 1,
"name": "PostgreSQL",
"type": "grafana-postgresql-datasource",
"typeName": "PostgreSQL",
"typeLogoUrl": "public/app/plugins/datasource/grafana-postgresql-datasource/img/postgresql_logo.svg",
"access": "proxy",
"url": "postgres:5432",
"user": "fdlogup",
"secureJsonData": {"password": "fdlogup"},
"database": "",
"basicAuth": false,
"isDefault": true,
"jsonData": {
"connMaxLifetime": 14400,
"database": "fdlogup",
"maxIdleConns": 100,
"maxIdleConnsAuto": true,
"maxOpenConns": 100,
"postgresVersion": 1600,
"sslmode": "disable"
},
"readOnly": false
}