{"id":17449521,"url":"https://github.com/jplane/dotnet-core-and-mongo-containers","last_synced_at":"2025-04-19T14:57:16.590Z","repository":{"id":95098260,"uuid":"89759132","full_name":"jplane/dotnet-core-and-mongo-containers","owner":"jplane","description":"A demonstration of ASP.NET Core + MongoDB in containers","archived":false,"fork":false,"pushed_at":"2017-05-15T03:24:02.000Z","size":12450,"stargazers_count":8,"open_issues_count":0,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T09:05:34.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jplane.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-29T02:37:22.000Z","updated_at":"2020-10-15T21:42:48.000Z","dependencies_parsed_at":"2023-05-26T16:00:39.637Z","dependency_job_id":null,"html_url":"https://github.com/jplane/dotnet-core-and-mongo-containers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fdotnet-core-and-mongo-containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fdotnet-core-and-mongo-containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fdotnet-core-and-mongo-containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jplane%2Fdotnet-core-and-mongo-containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jplane","download_url":"https://codeload.github.com/jplane/dotnet-core-and-mongo-containers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249719071,"owners_count":21315152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-17T21:42:01.184Z","updated_at":"2025-04-19T14:57:16.585Z","avatar_url":"https://github.com/jplane.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Deploying an ASP.NET Core + MongoDB app to local Docker and remote Azure Container Service (w/ Kubernetes)\n\n------------\n\nPrerequisites:\n\n- Install Docker on a local machine\n\n    https://docs.docker.com/engine/installation/\n\n- Install Azure CLI 2.0\n\n    https://docs.microsoft.com/en-us/cli/azure/install-azure-cli\n\n- Install .NET Core SDK\n\n    https://www.microsoft.com/net/download/core\n\n- Create a Kubernetes cluster in Azure\n\n    https://docs.microsoft.com/en-us/azure/container-service/container-service-kubernetes-walkthrough\n\n- Create a VHD disk in Azure for Mongo persistence\n\n    https://github.com/colemickens/azure-kubernetes-demo\n\n--------------------------------\n\nUPDATE: Here's a screencast of these demo steps in action... https://channel9.msdn.com/Blogs/MVP-Azure/Containers-Two-Ways\n\n--------------------------------\n\n1. build web api app from command line\n\n    - dotnet restore\n    - dotnet build\n    - dotnet publish -o published\n\n1. build docker image locally\n\n    - docker build -t {YOUR-DOCKER-ID}/the-app .\n\n1. run docker image + mongodb locally\n\n    - docker run -d -p 27017:27017 --name mongodb bitnami/mongodb:latest\n    - docker run -d -p 80:80 --name webapi --link mongodb {YOUR-DOCKER-ID}/the-app\n\n1. push app container to Docker Hub\n\n    - docker login\n    - docker push {YOUR-DOCKER-ID}/the-app\n\n1. use Azure CLI to connect to ACS cluster\n\n    - az login\n    - az account set --subscription \"{YOUR-AZURE-SUBSCRIPTION-ID}\"\n    - az acs kubernetes get-credentials --resource-group=\"{YOUR-ACS-RG-NAME}\" --name=\"{YOUR-KUBE-ACS-NAME}\"\n\n1. push mongo service\n\n    - kubectl apply -f mongo.service.yaml\n\n1. push mongo deployment\n\n    - update mongo.deployment.yaml\n    - kubectl apply -f mongo.deployment.yaml\n\n1. push app service\n\n    - kubectl apply -f app.service.yaml\n\n1. push app deployment\n\n    - update app.deployment.yaml\n    - kubectl apply -f app.deployment.yaml\n\n1. admin UI\n\n    - kubectl proxy\n    - localhost:8001/ui\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplane%2Fdotnet-core-and-mongo-containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjplane%2Fdotnet-core-and-mongo-containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjplane%2Fdotnet-core-and-mongo-containers/lists"}