Home - liannoi/wlodzimierz GitHub Wiki

Local Deployment

To begin with, I would like to note that the project, or rather server RESTful Web API, can be deployed in two options:

  • Classic (using .NET CLI and / or Windows operating system).
  • Deploying Docker containers in a composition via Docker Compose.

In any case the requirements will be the same, except for the ways of interacting with tools, depending on the chosen strategy.

Prerequisites

Thus, you will need the following tools:


Classic

.NET 5 - Classic build

There are no instructions due to technical limitations (during development, a strategy with Docker is used on macOS Big Sur operating system).

Docker

.NET 5 - Deployment in Docker

Use the following instructions to deploy in Docker containers as composition using Docker Compose.

  1. Clone the repository.
gh repo clone liannoi/wlodzimierz

Database

  1. Go to the directory with the script to create a database.
cd /wlodzimierz/database
  1. Open the wlodzimierz.sql file through the Database Management System (DBMS).

  2. Execute the script, connect to your local instance of Microsoft SQL Server.

If you are using macOS, you will first need to follow the instructions below for the RESTful Web API, ignoring the problems with starting the RESTful Web API itself. After executing the script to create the database - repeat the entire procedure with the RESTful Web API again!

RESTful Web API

  1. Go to the root directory of the project and then to the directory with the source code.
cd /wlodzimierz/src
  1. Start the Docker service (for macOS only Docker Desktop application needs to be started).

  1. Download the images necessary for the composition from Docker Registry, on the basis of which Docker Compose will build the container composition.
docker-compose pull
  1. Build Web API container from the described Dockerfile.
docker-compose build
  1. Deploying a Docker composition.
docker-compose up -d

Or just run the simplified command to deploy the composition.

docker-compose pull && docker-compose up --build -d

  1. Launch https://localhost:5001/api in your browser and you will see Swagger generated RESTful API documentation.

SPA web app

  1. Go to the directory with the frontend.
cd /wlodzimierz/src/Clients/web-spa
  1. Install all dependencies locally and run Angular application.
npm install && npm run start-prod