From 4f21fd8aa884a990f898e149d51d9e6d909a84a0 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Tue, 10 Sep 2024 14:30:05 +0200 Subject: [PATCH] docker push command, config logging --- Makefile | 5 ++++- sync-service/main.go | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d9f4735..27563e8 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ -run: +sync-run: cd sync-service && PLANNER_DB_PATH=test.db PLANNER_PORT=8092 PLANNER_API_KEY=testKey go run . + +sync-build-and-push: + cd sync-service && docker build . -t codeberg.org/ewintr/syncservice && docker push codeberg.org/ewintr/syncservice diff --git a/sync-service/main.go b/sync-service/main.go index 93ed525..e8240a0 100644 --- a/sync-service/main.go +++ b/sync-service/main.go @@ -36,6 +36,13 @@ func main() { } logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) + logger.Info("configuration", "configuration", map[string]string{ + "dbPath": dbPath, + "port": fmt.Sprintf("%d", port), + "apiKey": "***", + "crtPath": crtPath, + "keyPath": keyPath, + }) address := fmt.Sprintf(":%d", port) srv := NewServer(repo, apiKey, logger)