Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 1.84 KB

File metadata and controls

73 lines (46 loc) · 1.84 KB

Shizima Web API

This API is deployed on our personnal server. It's easier to use, because some prerequisites are needed to run it locally !

Deployed version of : ShizimaWebAPI

Run the API in Docker

Prerequisites:

  • PostgresSQL database

  • MinioServer

You need to pull this docker image: docker.isima.fr/axdelafuen/shizima_webapi@latest. (You can also build the image your self, the Dockerfile is in ./Sources/Shizima.WebAPI/Dockerfile)

Then setup some env variables:

  • ConnectionStrings__DefaultConnection : "Host=localhost;Port=5432;Database=AppDBName;Username=username;Password=password"
  • Minio__Access__Key : "accessKey"
  • Minio__Secret__Key : "secretKey"

Run the API locally

Prerequisites:

  • PostgresSQL database

  • EntityFrameworkCore

  • MinioServer

Clone repo:

git clone https://gitlab.isima.fr/shizima/servers/api.git

Edit config to fit with your SQL Server database & Minio Server:

Sources/Shizima.WebAPI/appsettings.json

"ConnectionStrings": {
  "DefaultConnection": "Host=localhost;Port=5432;Database=AppDBName;Username=username;Password=password"
},
"Minio": {
  "Endpoint": "url.to.your.minioserver",
  "AccessKey": "accessKey",
  "SecretKey": "secretKey",
  "UseSSL": "true"
},

You'll need also to need to subscribe to our NuGet feed to get the librairies we just developed.

dotnet nuget add source "https://gitlab.isima.fr/api/v4/groups/11770/-/packages/nuget/index.json" --name "gitlab.isima" --username youtGitLabUsername --password youtGitLabAccessToken 

Finnaly, you'll have to migrate our databse. Please refer to the document migrations.md.

Then, Restore & Build:

cd Sources/

dotnet restore

dotnet build --no-restore

Run the project using https or IIS. The Swagger doc should automatically open.