docker push command, config logging

This commit is contained in:
Erik Winter 2024-09-10 14:30:05 +02:00
parent cb1af81da7
commit 4f21fd8aa8
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,6 @@
run: sync-run:
cd sync-service && PLANNER_DB_PATH=test.db PLANNER_PORT=8092 PLANNER_API_KEY=testKey go 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

View File

@ -36,6 +36,13 @@ func main() {
} }
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil)) 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) address := fmt.Sprintf(":%d", port)
srv := NewServer(repo, apiKey, logger) srv := NewServer(repo, apiKey, logger)