Dockerized .NET backend and Angular frontend.
Two containers:
- Frontend (Angular)
- Backend (Gateway, Service1 and Service2)
The following assumptions are made:
- You have Docker Desktop installed
- You have Visual Studio 2022 installed
Create the following self signed certificates for each of the services located in the backend folder
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\Gateway.pfx -p pa55w0rd!
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\Service1.pfx -p pa55w0rd!
dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\Service2.pfx -p pa55w0rd!
dotnet dev-certs https --trust
dotnet user-secrets set "Kestrel:Certificates:Development:Password" "pa55w0rd!"
dotnet dev-certs https -ep frontend.pfx -p pa55w0rd!
openssl pkcs12 -in ./frontend.pfx -clcerts -nokeys -out frontend.crt
openssl pkcs12 -in ./frontend.pfx -nocerts -nodes -out frontend.key
Import frontend.pfx into your certificate store (Windows):
- Double-click on the self-signed certificate file (with the .crt extension) to open the certificate details.
- Click on the "Install Certificate" button.
- Select "Local Machine" and click "Next."
- Choose "Place all certificates in the following store" and click "Browse."
- Select "Trusted Root Certification Authorities" and click "OK."
- Click "Next" and then "Finish" to complete the installation.
docker-compose up --build
- Open a browser and navigate to https://localhost:9090
The deployment files have been created with stub values. I don't know enough about Kubernetes to make it work yet. Stay tuned!
Docker Desktop
Frontend
- The Gateway, Service1 and Service2 should be in their own containers
Frank Hale <frankhaledevelops@gmail.com>
24 May 2023

