From 1962bd885b06cdddf1e6ac8d060352054ff8a27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Thu, 12 Jun 2025 12:59:39 +0200 Subject: [PATCH] comments in config, added tmp to gitignore --- .gitignore | 1 + server/internal/config/config.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 1a4ff37..7786bed 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ venv/ /storage/ scanners/ole/venv/ +tmp/ # Created by https://www.toptal.com/developers/gitignore/api/linux,go,vim,visualstudiocode,macos,windows # Edit at https://www.toptal.com/developers/gitignore?templates=linux,go,vim,visualstudiocode,macos,windows diff --git a/server/internal/config/config.go b/server/internal/config/config.go index 722984a..57568c6 100644 --- a/server/internal/config/config.go +++ b/server/internal/config/config.go @@ -37,12 +37,14 @@ func setDefaults() { viper.SetDefault("web.key", "/etc/ssl/key/ssl-cert-snakeoil.key") viper.SetDefault("web.loghttp", true) viper.SetDefault("web.maxfilesizemb", 100) + // Database viper.SetDefault("db.host", "localhost") viper.SetDefault("db.port", 5432) viper.SetDefault("db.user", "scanfile") viper.SetDefault("db.database", "scanfile") viper.SetDefault("db.password", "CHANGEME") viper.SetDefault("db.debug", false) + // Others viper.SetDefault("processing.oleurl", "http://localhost:5000") viper.SetDefault("store.path", "./storage/files/") viper.SetDefault("debug", false)