feat: introduce YAML configuration

This commit is contained in:
2025-05-06 13:19:20 +02:00
parent 6017bf86f9
commit 3bbb689cac
9 changed files with 170 additions and 25 deletions

View File

@@ -1,5 +1,5 @@
SHELL := bash
ARCH ?= arm64
ARCH ?= amd64
ADDR ?= 0.0.0.0:8080
generate:
@@ -11,10 +11,12 @@ build:
env GOOS=linux GOARCH=${ARCH} go build -o bin/rcond-${ARCH} ./cmd/rcond/main.go
run:
source .env && bin/rcond-${ARCH} ${ADDR}
bin/rcond-${ARCH} -config config.yaml
dev:
RCOND_API_TOKEN=1234567890 go run cmd/rcond/main.go
RCOND_ADDR=127.0.0.1:8080 \
RCOND_API_TOKEN=1234567890 \
go run cmd/rcond/main.go
upload:
scp bin/rcond-${ARCH} pi@rpi-test:/home/pi/rcond