From e1a9d4717758271065c59921406e704a5bb0824a Mon Sep 17 00:00:00 2001 From: Jean Gatto Date: Sun, 16 Mar 2025 09:38:03 -0300 Subject: [PATCH] refactor: update docker-compose files for improved configuration and add external volumes for MongoDB --- .gitattributes | 20 ++++++++++---------- docker-compose.override.yml | 3 +-- docker-compose.yml | 9 ++++++++- global.json | 2 +- src/Shop.PublicApi/appsettings.Docker.json | 2 +- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.gitattributes b/.gitattributes index 2a0ee19..295223b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,13 +10,13 @@ *.dbproj merge=union # Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 239e9eb..7b0f437 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,5 +1,4 @@ services: - shop-webapi: environment: - ASPNETCORE_ENVIRONMENT=Docker @@ -8,4 +7,4 @@ services: - "80" volumes: - ~/.aspnet/https:/root/.aspnet/https:ro - - ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro \ No newline at end of file + - ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro diff --git a/docker-compose.yml b/docker-compose.yml index 5e69716..6ffa876 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,9 @@ services: - "1433:1433" environment: - ACCEPT_EULA=Y - - SA_PASSWORD=pMA63033n6tF + - MSSQL_SA_PASSWORD=pMA63033n6tF + - MSSQL_PID=Developer + - MSSQL_COLLATION=Latin1_General_CI_AI networks: - app-network volumes: @@ -67,7 +69,12 @@ services: - "6379:6379" networks: - app-network + volumes: + - "./data-mongo:/data/db" volumes: data-mssql: external: true + + data-mongo: + external: true diff --git a/global.json b/global.json index e4b3981..8515778 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.103", + "version": "9.0.201", "rollForward": "latestMajor", "allowPrerelease": false } diff --git a/src/Shop.PublicApi/appsettings.Docker.json b/src/Shop.PublicApi/appsettings.Docker.json index 7cb74bc..4af45fe 100644 --- a/src/Shop.PublicApi/appsettings.Docker.json +++ b/src/Shop.PublicApi/appsettings.Docker.json @@ -10,7 +10,7 @@ } }, "ConnectionStrings": { - "SqlConnection": "Server=shop-sql-server;Integrated Security=true;Initial Catalog=ShopContext;User Id=sa;Password=pMA63033n6tF;Trusted_Connection=false;MultipleActiveResultSets=true;Encrypt=True;TrustServerCertificate=True;", + "SqlConnection": "Server=shop-sql-server;Integrated Security=true;Initial Catalog=ShopContext;User Id=sa;Password=pMA63033n6tF;Trusted_Connection=False;TrustServerCertificate=True;", "NoSqlConnection": "mongodb://shop-mongo-server", "CacheConnection": "shop-redis:6379,password=pMA63033n6tF,abortConnect=false" },