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