diff --git a/.drone.yml b/.drone.yml index e5ed6f6..6d34d8c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -74,6 +74,7 @@ steps: CONTAINERNAME: api-in-english-please COMMAND: create OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_BASE_PATH: /containers/antoinejourdain-api-in-english-please/ depends_on: [ docker-build-api ] when: branch: @@ -103,6 +104,7 @@ steps: CONTAINERNAME: in-english-please COMMAND: create OVERWRITE: true + CODEFIRST_CLIENTDRONE_ENV_BASE_PATH: /containers/antoinejourdain-in-english-please/ depends_on: [ docker-build-app ] when: branch: diff --git a/Project/adminBlazor/adminBlazor/Properties/launchSettings.json b/Project/adminBlazor/adminBlazor/Properties/launchSettings.json index 968fc55..c800f94 100644 --- a/Project/adminBlazor/adminBlazor/Properties/launchSettings.json +++ b/Project/adminBlazor/adminBlazor/Properties/launchSettings.json @@ -1,14 +1,5 @@ { "profiles": { - "http": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:5138", - "dotnetRunMessages": true - }, "https": { "commandName": "Project", "launchBrowser": true, diff --git a/Project/adminBlazor/adminBlazor/Services/DataApiService.cs b/Project/adminBlazor/adminBlazor/Services/DataApiService.cs index 48ffc7b..7ede194 100644 --- a/Project/adminBlazor/adminBlazor/Services/DataApiService.cs +++ b/Project/adminBlazor/adminBlazor/Services/DataApiService.cs @@ -25,24 +25,24 @@ namespace adminBlazor.Services var item = UserFactory.Create(model); // Save the data - await _http.PostAsJsonAsync("https://localhost:7234/api/User/add", item); + await _http.PostAsJsonAsync("http://host.docker.internal:7234/api/User/", item); } public async Task Count() { - return await _http.GetFromJsonAsync("https://localhost:7234/api/User/count"); + return await _http.GetFromJsonAsync("http://host.docker.internal:7234/api/User/count"); } public async Task> List(int currentPage, int pageSize) { _logger.LogInformation("User API : call of method LIST."); - return await _http.GetFromJsonAsync>($"https://localhost:7234/api/User/?currentPage={currentPage}&pageSize={pageSize}"); + return await _http.GetFromJsonAsync>($"http://host.docker.internal:7234/api/User/?currentPage={currentPage}&pageSize={pageSize}"); } public async Task GetById(int id) { _logger.LogInformation("User API : call of method GetByID."); - return await _http.GetFromJsonAsync($"https://localhost:7234/api/User/{id}"); + return await _http.GetFromJsonAsync($"http://host.docker.internal:7234/api/User/{id}"); } public async Task Update(int id, UserModel model) @@ -52,18 +52,18 @@ namespace adminBlazor.Services _logger.LogInformation("User API : call of method UPDATE on User ID : {Id}.", id); - await _http.PutAsJsonAsync($"https://localhost:7234/api/User/{id}", item); + await _http.PutAsJsonAsync($"http://host.docker.internal:7234/api/User/{id}", item); } public async Task Delete(int id) { _logger.LogInformation("User API : call of method DELETE on User ID : {Id}.", id); - await _http.DeleteAsync($"https://localhost:7234/api/User/{id}"); + await _http.DeleteAsync($"http://host.docker.internal:7234/api/User/{id}"); } public async Task> GetRecipes() { - return await _http.GetFromJsonAsync>("https://localhost:7234/api/User/recipe"); + return await _http.GetFromJsonAsync>("http://host.docker.internal:7234/api/User/recipe"); } } } diff --git a/Project/adminBlazor/adminBlazor/appsettings.json b/Project/adminBlazor/adminBlazor/appsettings.json index 0a3b356..6c8acc2 100644 --- a/Project/adminBlazor/adminBlazor/appsettings.json +++ b/Project/adminBlazor/adminBlazor/appsettings.json @@ -1,4 +1,5 @@ { + "https_port": 443, "Creators": { "Name": [ "Patrick Brugière", @@ -10,7 +11,8 @@ "Logging": { "LogLevel": { "Default": "Error", - "Microsoft": "Warning" + "Microsoft.AspNetCore": "Warning", + "Microsoft.AspNetCore.DataProtection": "None" }, "Debug": { "LogLevel": {