Small fix with the environment
This commit is contained in:
@@ -42,14 +42,16 @@ func main() {
|
||||
|
||||
port := os.Getenv("BACKEND_DOCKER_PORT")
|
||||
hostname := os.Getenv("DATABASE_HOSTNAME")
|
||||
postgres_port := os.Getenv("POSTGRES_DOCKER_PORT")
|
||||
if environ == "DEV" {
|
||||
port = os.Getenv("BACKEND_PORT")
|
||||
hostname = "localhost"
|
||||
postgres_port = os.Getenv("POSTGRES_PORT")
|
||||
}
|
||||
|
||||
dsn := core.DSN{
|
||||
Hostname: hostname,
|
||||
Port: os.Getenv("POSTGRES_PORT"),
|
||||
Port: postgres_port,
|
||||
DBName: os.Getenv("POSTGRES_DB"),
|
||||
User: os.Getenv("POSTGRES_USER"),
|
||||
Password: os.Getenv("POSTGRES_PASSWORD"),
|
||||
|
||||
Reference in New Issue
Block a user