diff --git a/docker-compose.yml b/docker-compose.yml index 2d99370..157893f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,20 @@ services: build: context: . dockerfile: src/Web/Dockerfile + depends_on: + - "sqlserver" eshoppublicapi: image: ${DOCKER_REGISTRY-}eshoppublicapi build: context: . dockerfile: src/PublicApi/Dockerfile + depends_on: + - "sqlserver" + sqlserver: + image: mcr.microsoft.com/azure-sql-edge + ports: + - "1433:1433" + environment: + - SA_PASSWORD=@someThingComplicated1234 + - ACCEPT_EULA=Y diff --git a/src/PublicApi/appsettings.Docker.json b/src/PublicApi/appsettings.Docker.json index f3bcd06..0aa16e3 100644 --- a/src/PublicApi/appsettings.Docker.json +++ b/src/PublicApi/appsettings.Docker.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { - "CatalogConnection": "Server=(localdb)\\mssqllocaldb;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.CatalogDb;", - "IdentityConnection": "Server=(localdb)\\mssqllocaldb;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.Identity;" + "CatalogConnection": "Server=sqlserver,1433;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.CatalogDb;User Id=sa;Password=@someThingComplicated1234;Trusted_Connection=false;", + "IdentityConnection": "Server=sqlserver,1433;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.Identity;User Id=sa;Password=@someThingComplicated1234;Trusted_Connection=false;" }, "baseUrls": { "apiBase": "http://localhost:5200/api/", diff --git a/src/Web/appsettings.Docker.json b/src/Web/appsettings.Docker.json index 0b4b57a..bac53d6 100644 --- a/src/Web/appsettings.Docker.json +++ b/src/Web/appsettings.Docker.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { - "CatalogConnection": "Server=(localdb)\\mssqllocaldb;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.CatalogDb;", - "IdentityConnection": "Server=(localdb)\\mssqllocaldb;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.Identity;" + "CatalogConnection": "Server=sqlserver,1433;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.CatalogDb;User Id=sa;Password=@someThingComplicated1234;Trusted_Connection=false;", + "IdentityConnection": "Server=sqlserver,1433;Integrated Security=true;Initial Catalog=Microsoft.eShopOnWeb.Identity;User Id=sa;Password=@someThingComplicated1234;Trusted_Connection=false;" }, "baseUrls": { "apiBase": "http://localhost:5200/api/",