Docker compose for scala and postgres

This commit is contained in:
Guntis Smaukstelis
2023-12-19 14:47:45 +02:00
parent 69458131bd
commit d08422f929
4 changed files with 53 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ case class PostgresConfig(url: String, username: String, password: String)
object DBConnection {
private def getDatabaseUrl: String =
sys.env.getOrElse("DATABASE_URL", "postgres://postgres:mysecretpassword@localhost:5432/weather-tool")
sys.env.getOrElse("DATABASE_URL", "postgres://postgres:mysecretpassword@postgres:5432/weather-tool")
private def parseUrl(url: String): Either[String, PostgresConfig] = {
Try {