Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nishanil/docker-aspnet-weather
A simple demo explaining Docker, ASP.NET Core
https://github.com/nishanil/docker-aspnet-weather
Last synced: about 1 month ago
JSON representation
A simple demo explaining Docker, ASP.NET Core
- Host: GitHub
- URL: https://github.com/nishanil/docker-aspnet-weather
- Owner: nishanil
- Created: 2021-05-03T13:21:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-31T14:02:51.000Z (over 3 years ago)
- Last Synced: 2024-10-29T18:29:00.367Z (3 months ago)
- Language: C#
- Size: 688 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
## Docker ASP.NET Core Sample
Open the solution in Visual Studio, set "docker-compose" as start project and run.
To run from CLI, use `docker-compose build` and then `docker-compose up`. Navigate to `http://localhost:5902/` from the browser.
## Local Kubernetes deployment (without local code build)
The deploy scripts by default uses the images from my DockerHub. Local building of the images aren't required if you are only testing the application in k8s.
Navigate to k8s folder and apply both the deployments to K8S.
`kubectl apply -f .\deploy-backend.yaml`
`kubectl apply -f .\deploy-frontend.yaml`
Use the following command to check if the pods are running successfully:
`kubectl get po`
Make sure the containers are running:
```
➜ k8s git:(main) ✗ kubectl get po
NAME READY STATUS RESTARTS AGE
backend-5b7b5b4855-dtlhw 1/1 Running 0 4m32s
frontend-5f7fdfdb77-ngxfk 1/1 Running 0 4m25s
➜ k8s git:(main) ✗
```Map a local port and navigate to the local url:
```
kubectl port-forward svc/frontend 5600:80
```
Navigate to `http://localhost:5600` in a browser to verify the app.