diff --git a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs index f5e0d88..05901c5 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.Employees/Controllers/EmployeesController.cs @@ -19,7 +19,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// GET request for retrieving employees. /// - [HttpGet("Employees")] + [HttpGet("employees")] public async Task GetEmployeesAsync() { @@ -36,7 +36,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// GET request for retrieving an employee by ID. /// - [HttpGet("Employees/{id}")] + [HttpGet("employees/{id}")] public async Task GetEmployeeByIdAsync(int id) { @@ -53,7 +53,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// PUT request for updating an existing employee. /// /// The updated employee object. - [HttpPut("Employees/{id}")] + [HttpPut("employees/{id}")] public async Task UpdateEmployee(int id, Models.Employee Employee) { if (Employee != null) @@ -75,7 +75,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// POST request for creating a new employee. /// /// The employee information for creating a new employee. - [HttpPost("Employees")] + [HttpPost("employees")] public async Task CreateEmployee(Models.Employee Employee) { if (Employee != null) @@ -93,7 +93,7 @@ namespace DamageAssesment.Api.Employees.Controllers /// DELETE request for deleting an existing employee. /// /// The ID of the employee to be deleted. - [HttpDelete("Employees/{id}")] + [HttpDelete("employees/{id}")] public async Task DeleteEmployee(int id) { var result = await this.EmployeeProvider.DeleteEmployeeAsync(id); diff --git a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Providers/SurveyResponsesProvider.cs b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Providers/SurveyResponsesProvider.cs index 03eada1..c46ecc4 100644 --- a/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Providers/SurveyResponsesProvider.cs +++ b/DamageAssesmentApi/DamageAssesment.Api.SurveyResponses/Providers/SurveyResponsesProvider.cs @@ -31,7 +31,7 @@ namespace DamageAssesment.Api.SurveyResponses.Providers this.questionServiceProvider = questionServiceProvider; this.surveyServiceProvider = surveyServiceProvider; this.mapper = mapper; - // seedData(); + seedData(); } private void seedData() diff --git a/DamageAssesmentApi/docker-compose.asf.yml b/DamageAssesmentApi/docker-compose.asf.yml index cf60fca..2a5587c 100644 --- a/DamageAssesmentApi/docker-compose.asf.yml +++ b/DamageAssesmentApi/docker-compose.asf.yml @@ -6,14 +6,14 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6001:80" attachments: image: santhoshsnair/damageassesmentapiattachments:latest environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6002:80" employees: @@ -21,7 +21,7 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6003:80" locations: @@ -29,7 +29,7 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6004:80" questions: @@ -37,7 +37,7 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6005:80" responses: @@ -60,7 +60,7 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" + - "6007:80" doculinks: @@ -68,5 +68,13 @@ services: environment: - ASPNETCORE_ENVIRONMENT=Development ports: - - "80/http" - + - "6009:80" + sqlserver: + image: mcr.microsoft.com/mssql/server:2019-latest + environment: + - SA_PASSWORD=your_password + - ACCEPT_EULA=Y + ports: + - "1433:1433" + volumes: + - ./sql_data:/var/opt/mssql/data \ No newline at end of file diff --git a/DamageAssesmentApi/docker-compose.dcproj b/DamageAssesmentApi/docker-compose.dcproj index 54bf0c1..178f3d6 100644 --- a/DamageAssesmentApi/docker-compose.dcproj +++ b/DamageAssesmentApi/docker-compose.dcproj @@ -9,6 +9,7 @@ damageassesment.api.answers + docker-compose.yml diff --git a/DamageAssesmentApi/docker-compose.sql.yml b/DamageAssesmentApi/docker-compose.sql.yml new file mode 100644 index 0000000..e029b38 --- /dev/null +++ b/DamageAssesmentApi/docker-compose.sql.yml @@ -0,0 +1,78 @@ +version: '3.4' + +services: + answers: + image: santhoshsnair/damageassesmentapianswers:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6001:80" + + attachments: + image: santhoshsnair/damageassesmentapiattachments:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6002:80" + + + employees: + image: santhoshsnair/damageassesmentapiemployees:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6003:80" + + + locations: + image: santhoshsnair/damageassesmentapilocations:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6004:80" + + + questions: + image: santhoshsnair/damageassesmentapiquestions:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6005:80" + + + responses: + image: santhoshsnair/damageassesmentapisurveyresponses:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + - services__Answers=http://10.0.0.4:19081/dasapp/answers/ + - services__Locations=http://10.0.0.4:19081/dasapp/locations/ + - services__Questions=http://10.0.0.4:19081/dasapp/questions/ + - services__Employees=http://10.0.0.4:19081/dasapp/employees/ + - services__Attachments=http://10.0.0.4:19081/dasapp/attachments/ + - services__Surveys=http://10.0.0.4:19081/dasapp/survey/ + + ports: + - "6006:80" + + + surveys: + image: santhoshsnair/damageassesmentapisurveys:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6007:80" + + + doculinks: + image: santhoshsnair/damageassesmentapidoculinks:latest + environment: + - ASPNETCORE_ENVIRONMENT=Development + ports: + - "6009:80" + sqlserver: + image: mcr.microsoft.com/mssql/server:2019-latest + environment: + - SA_PASSWORD=your_password + - ACCEPT_EULA=Y + ports: + - "1433:1433"