dev/install (#58)
All checks were successful
Tests / Run Go Tests (push) Successful in 1m24s

improved ci/cd pipeline + interactive install script

Reviewed-on: #58
Co-authored-by: Tom Tröger <t.troeger.02@gmail.com>
Co-committed-by: Tom Tröger <t.troeger.02@gmail.com>
This commit is contained in:
2025-11-30 21:25:47 +01:00
committed by Tom Tröger
parent 7e5eaebca9
commit 6ab48eb534
9 changed files with 132 additions and 19 deletions

View File

@@ -14,7 +14,8 @@ func OpenDatabase() (models.IDatabase, error) {
dbName := helper.GetEnv("POSTGRES_DB", "arbeitszeitmessung")
dbUser := helper.GetEnv("POSTGRES_API_USER", "api_nutzer")
dbPassword := helper.GetEnv("POSTGRES_API_PASS", "password")
dbTz := helper.GetEnv("TZ", "Europe/Berlin")
connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable&TimeZone=Europe/Berlin", dbUser, dbPassword, dbHost, dbName)
connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable&TimeZone=%s", dbUser, dbPassword, dbHost, dbName, dbTz)
return sql.Open("postgres", connStr)
}