Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 2.05 KB

README.md

File metadata and controls

73 lines (45 loc) · 2.05 KB

CookBook Recipes

About

CookBook Recipes is a service for managing recipes, its ingredients and instructions.

Prerequisites

Ensure Docker Desktop is installed and open on your computer.

Ensure a MsSql Server container is running.

Ensure a Nuget Repository container is running.

Ensure nuget extensions packages are deployed at Nuget Repository.

Build database

Run the following command to build the database project:

dotnet build "./database/CookBook.Recipes.Database.sqlproj" /p:NetCoreBuild=true /p:NETCoreTargetsPath="C:\Users\laura.kolcavova\.azuredatastudio\extensions\microsoft.sql-database-projects-1.4.2\BuildDirectory" -o "./database/build_output"

Or from the deploy folder run the following command:

01_Database_Build.bat

Database release

Run the following command to publish the database project to MsSql Server:

sqlpackage /a:Publish /sf:"./database/build_output/CookBook.Recipes.Database.dacpac" /TargetConnectionString:"Data source=localhost,8000;User Id=SA;Initial Catalog=CookBookRecipes;Integrated Security=False;TrustServerCertificate=True;Application Name=CookBookRecipes;Password=y9WH7F4hNL"

Or from the deploy folder run the following command:

02_Database_Release.bat

Build container

Run the following command to create a Docker image and tag it with the name book-recipes (host network must be used for building the image):

docker build -t cookbook-recipes --network host .

Or from the deploy folder run the following command:

03_Container_Build.bat

Release container

Run the following command to start a new Docker container using the book-catalog image:

docker run -it --rm -p 8010:8010 --name cookbook-recipes-container -d cookbook-recipes

Or from the deploy folder run the following command:

04_Container_Release.bat

The CookBook Recipes service will be hosted on http://localhost:8010