1 Commits

Author SHA1 Message Date
3f49da49b6 ad hoc fix
All checks were successful
Tests / Run Go Tests (push) Successful in 2m24s
Arbeitszeitmessung Deploy / Build Webserver (push) Successful in 2m52s
2026-01-18 20:43:38 +01:00
2 changed files with 2 additions and 3 deletions

View File

@@ -31,10 +31,8 @@ func Migrate() error {
dbPassword := helper.GetEnv("POSTGRES_PASSWORD", "password") dbPassword := helper.GetEnv("POSTGRES_PASSWORD", "password")
dbTz := helper.GetEnv("TZ", "Europe/Berlin") dbTz := helper.GetEnv("TZ", "Europe/Berlin")
migrations := helper.GetEnv("MIGRATIONS_PATH", "../migrations")
connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable&TimeZone=%s", "migrate", dbPassword, dbHost, dbName, dbTz) connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable&TimeZone=%s", "migrate", dbPassword, dbHost, dbName, dbTz)
m, err := migrate.New(fmt.Sprintf("file://%s", migrations), connStr) m, err := migrate.New("file:///migrations", connStr)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -27,6 +27,7 @@ services:
- db - db
volumes: volumes:
- ${LOG_PATH}:/app/logs - ${LOG_PATH}:/app/logs
- ${MIGRATIONS_PATH}:/migrations:ro
restart: unless-stopped restart: unless-stopped
# document-creator: # document-creator: