This is a sample project created by following the principles of Clean Architecture and Domain-driven design approach.
The API can be started locally within /src/your_project_name.Api
directory (by default it will be available under https://localhost:5001
) using the following command:
~$ dotnet run
or by running ./scripts/start.sh
shell script in the main directory.
You can also run the API using Docker:
- Make sure you are in the main directory and run the following command to build your image:
~$ docker build --tag tag_name .
- Run the following command to start a container based on your new image:
~$ docker run -p 5001:5001 -d --name container_name tag_name
*to run the container in the background use -d
options.
If you want to start the entire infrastructure (API, MongoDB). The easiest way to run it is by using docker-compose
. For this case, navigate to /scripts/compose
and execute the following command:
~$ docker-compose -f script_name.yml up -d
*to run in the background use -d
options.
Or just install the entire infrastructure locally on your machine.
If you like this project, learned something or you are using it to start your solution, please give it a star. Thanks!