angular-dotnet-core-docker
angular-dotnet-core-docker copied to clipboard
A jumpstart project built with Angular 18.1.0 (Frontend), .NET 8 (Api) and PostgreSQL featuring Docker support and styled with Bootstrap 5.
Full Stack (dotnet, angular and postgres) boilerplate with Docker
About (Dotnet - Angular - PostgresSQL)
This project is intended to provide a starting point for building full-stack web applicatioin. The stack is made of Dotnet(7) WebApi, Angular (18.1.0), PostgresSQL. The focus of this project to show case the possible way to run a real application (Dotnet, Angular and PostgresSQL) using docker for development enviornment and produciton mode.
This is a simple web application. It has working user registration, login page and there is a complete example of CRUD which contains example for Angular Routing and dotnet rest api samples. Also, rest services are secure using JWT.
Below is the architecture of the application while it is running.

To Quick Run
Clone repo, navigate to root folder and run docker compose up
git clone https://github.com/nitin27may/angular-dotnet-core-docker.git angular-dotnet
cd angular-dotnet
docker compose up
Please note, I have used Sendgrid, so it will require a sendgrid key to run, as it is sending an email confirmation on register, if you do not need, you can remove that code while registeing (in AccountService Class)
Project Folders
The apps written in the following JavaScript frameworks/libraries:
| folder | Description |
|---|---|
| frontend | frontend app using Angular |
| WebApi | Rest Api using dotnet |
Built With
Angular (18.1.0)
The fronend of this project is developed in Angular. As we are using Server Side Rendering (SSR) we have used Nodejs alpine image in place of other lightweight docker image like nginx to run Angular app.
It contains sample for below:
- User Registration
- Login
- Profile
- A complete CRUD example for Contact
Also, it has sample code for Auth guard, services, http interceptors, resolver and JWT implementation
Dockerfile for Production Dockerfile for Development
Dotnet (8.0.0)
Rest APis of this project is devloped using dotnet
It contains sample for:
- Middleware implemetation for logs
- JWT implementation for Authorization
- API routing
- User registration & login APIs
- Complete CRUD example for Contact
Dockerfile for production Dockerfile for development
Getting started
Using Docker
Prerequisite
Install latest Docker Desktop
Entity Framework Migration
We have added a dockerfile for entity framework migration and updating database.
Dockerfile for Migration
Development mode:
You can start the application in debug mode (database, api and frontend) using docker compose:
git clone https://github.com/nitin27may/angular-dotnet-core-docker.git angular-dotnet
cd angular-dotnet
docker compose -f 'docker-compose.debug.yml' up
It will run fronend http://localhost:4200 and api on http://localhost:8080. you can also access PGAdmin on port 5050 with username pssword provided in docker compose, username: [email protected], password: root.
Also, it will automatically refresh (hot reload) your UI for code and api code changes.