79393043

Date: 2025-01-28 07:47:11
Score: 1
Natty:
Report link

I found that your .env file contains DATABASE_URL which will be used for makefile to do migration up (https://github.com/bantawa04/go-fiber-boilerplate/blob/016a2b45c06882aea0d1efb8123e0cecdac427e2/.env#L11) i believe that your migration up is failed because your database host is database in .env file which is not pointing to anywhere. to make your code works your need to update DATABASE_URL from

postgresql://${DB_USERNAME}:${DB_PASSWORD}@database:5432/${DB_NAME}?sslmode=${DB_SSL_MODE}

to

postgresql://${DB_USERNAME}:${DB_PASSWORD}@{DB_HOST}:5432/${DB_NAME}?sslmode=${DB_SSL_MODE}

DB_HOST can be anything like localhost, ip address or your database's host in other server.

run smoothly on my local after edit database host

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Muhammad Al Farizzi