dev/install (#58)
All checks were successful
Tests / Run Go Tests (push) Successful in 1m24s
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ func FormatDuration(d time.Duration) string {
|
||||
|
||||
// Converts duration to string
|
||||
func FormatDurationFill(d time.Duration, fill bool) string {
|
||||
return fmt.Sprintf("%.1f", d.Hours())
|
||||
hours := int(d.Abs().Hours())
|
||||
minutes := int(d.Abs().Minutes()) % 60
|
||||
sign := ""
|
||||
|
||||
Reference in New Issue
Block a user