Skip to content

rodrigo11spbr/Anbima

Repository files navigation

Anbima Consumer API

CI-CD

Description

  • .Net Core 3.1
  • Swagger
  • Docker
  • Hexagonal Architecture
  • EF Core Sql Server
  • Repository and Unit of Work Pattern
  • SOLID and Inversion of Control

How to Start

Migration

When the project starts, the migration will run and create the necessary table, for this to work it is necessary to have the sql server with the "ANBIMA" database, in appsettings.json can be changed the connection and the name of the bank

Log

Log provider is seq the address is in appsettings.json , if you create an instance in the docker the address by default is the same

Docker

For create a image use docker build -t anbima/api .
For run image use docker run -p 5000:5000 anbima/api

Attention

For the Sql server and Seq to work, it is necessary to inform the ip of both. If they are in a container, enter the command docker inspect -f '{{range .NetworkSettings.Networks}} {{. IP_Address}} {{end}} 'container_name this will show the IP address. After you can change the address in appsettings.json

Request

[GET] http://localhost:5000/api/Anbima?date=yyyy-MM-dd

Used Images

  • Sql Server: docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Development_Password' -e 'MSSQL_PID=Express' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
  • Seq: docker run --name seq -d --restart unless-stopped -e ACCEPT_EULA=Y -p 5341:80 datalust/seq:latest