Migrating From Docker Compose to .NET Aspire (my experience)

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025

ความคิดเห็น • 113

  • @MilanJovanovicTech
    @MilanJovanovicTech  3 หลายเดือนก่อน +2

    Get the source code for this video for FREE → the-dotnet-weekly.ck.page/docker-aspire
    Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
    Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt

  • @BinaryNexus
    @BinaryNexus วันที่ผ่านมา +1

    Exactly the video I needed

  • @nothingisreal6345
    @nothingisreal6345 3 หลายเดือนก่อน +7

    Great video. Love Aspire. There a couple of further thins to consider e.g. what if you used DB first instead of cod first for EF Core.... Another thing I struggle with was using the neat Aspire dashboard not only when developing but in a deployed hosting e.g. on Azure. Sure there are ways to access the Open Telemetry with Azure itself, but I just love the integrated approach the Aspire Dashboard provides. Maybe another interesting topic to cover is how to handle secrets with e.g. Azure Key vault and some of the edge cases (e.g. restriction in how to name stuff).

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      @@nothingisreal6345 Nowadays when you deploy Aspire with AZD you get the Aspire Dashboard out of the box

  • @mohideenasraf7837
    @mohideenasraf7837 3 หลายเดือนก่อน +3

    Hey Milan, thanks for the video! It would be really helpful if you could explain the differences between Docker and Aspire. Also, could you highlight the advantages of Aspire over Docker? That way, we can make a more informed choice based on our requirements. Thanks!

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      Start here: learn.microsoft.com/en-us/dotnet/aspire/

  • @antonmartyniuk
    @antonmartyniuk 3 หลายเดือนก่อน +2

    Fantastic video, enjoyed watching it.
    Well done

  • @miguelrivas3301
    @miguelrivas3301 หลายเดือนก่อน

    Excellent demo @MilanJovanovicTech! It would be nice to see how all this translates to a production environment. Can you please make a video about that?

  • @ShaneGentry-s7o
    @ShaneGentry-s7o หลายเดือนก่อน

    Great intro! I'm still trying to understand what it looks like when you deploy to production from here.

    • @MilanJovanovicTech
      @MilanJovanovicTech  หลายเดือนก่อน

      Here's the video: th-cam.com/video/7FbiDviUsNU/w-d-xo.html

  • @jcorrify
    @jcorrify 3 หลายเดือนก่อน +2

    I would love to see an exemple with multi repo setup

  • @rathane1734
    @rathane1734 2 หลายเดือนก่อน

    it would be interesting to see integration between aspire and aws services like lambda serverless api etc

  • @user-uo7ch2lf3z
    @user-uo7ch2lf3z 3 หลายเดือนก่อน +1

    Wonderful video. I wish you could further show us how this could extend to deployment to Azure. Stay Awesome!

  • @egemenakdan8139
    @egemenakdan8139 3 หลายเดือนก่อน +2

    the missing part on this video is how do you secure the aspire dashboard from anyone that knows your aspire url??

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +4

      When deploying to Azure, it runs behind a reverse proxy that also performs Authentication. So, only users with a valid account can access the Aspire dashboard.
      If deploying it yourself, you just place a reverse proxy in front of the UI that does an OAuth redirect if the current user is unauthenticated.

  • @gabrielzalisz
    @gabrielzalisz 3 หลายเดือนก่อน

    Milan, I'd love you to make a video about deploying Aspire apps to on-premise Kubernetes cluster.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      Recorded an Azure ACA deployment video, coming out soon. ACA is basically a managed Kubernetes, if you will.

  • @sudidav
    @sudidav 3 หลายเดือนก่อน

    Damn, it is awesome!

  •  3 หลายเดือนก่อน

    Gracias, excelente contenido.

  • @DotNetFun
    @DotNetFun 3 หลายเดือนก่อน

    Great video. Have you used Aspire on any projects in production environment? what were the challenges in your opinion?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      Deployed a few demo apps with Aspire, and so far it's been smooth sailing. The deployment is a bit messy, IMO. You'd need to rewrite it to your CI to simplify it.

  • @bartlomiejuminski
    @bartlomiejuminski 3 หลายเดือนก่อน

    9:20 I had this error with Blazor WASM and Aspire setup. That's why I chose Docker. I think I will give .NET Aspire another chance in the future.

  • @sunnychu19951
    @sunnychu19951 3 หลายเดือนก่อน

    Love it.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      Aspire 9 just around the corner 😁

  • @Prabhuchandan
    @Prabhuchandan 3 หลายเดือนก่อน

    Can you please make a video on using .NET Aspire as test container for integration testing?

  • @mohamedkabha1761
    @mohamedkabha1761 3 หลายเดือนก่อน +1

    Hi Milan thanks for the great video, I have a question Can we use Keycloak with Aspire? It is confusing me how to configurate the AppHost with the docker Keycloak container or even any external docker container!

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      Yes, it's all explained nicely in the docs. Works great.

  • @RyanBuening
    @RyanBuening 3 หลายเดือนก่อน

    Very cool @MilanJovanovicTech! You mentioned nginx at the beginning of the video...are there migration things to consider from that standpoint when attempting to deploy an Aspire setup to a Linux server?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      No, this was just me trying to run the Blazor WA app in docker-compose. It'll run "out of the box" with Aspire. Not sure about the deployment though.

  • @ahmedabdellatif4797
    @ahmedabdellatif4797 2 หลายเดือนก่อน

    How would one go about developing and running a single service locally, how would that go with the way you configured the connection strings?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 หลายเดือนก่อน

      You can just plug the connection strings as ENV vars with the correct name

  • @Buutyful
    @Buutyful 2 หลายเดือนก่อน

    hello milan nice video :) i have one question, how have u done the psql migrations?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 หลายเดือนก่อน

      Migration as in... moving the data?

    • @Buutyful
      @Buutyful 2 หลายเดือนก่อน

      @@MilanJovanovicTech sorry for the confusing question, i just meant to ask if u were doing migration on app start up and persiting them with some data volume or if u structured them in any other way

  • @iteospace
    @iteospace 10 วันที่ผ่านมา

    How about different ways to deploy Aspire Apps. K8s, MiniKube, Aspir8

  • @shahidwani6445
    @shahidwani6445 10 วันที่ผ่านมา

    Does it mean aspire replaces docker compose. Do i still need docker desktop

  • @schoderfactory
    @schoderfactory 2 หลายเดือนก่อน

    How do you set up Aspire if you have a couple of different Visual Studio solutions with different clean archtiecture projects in each solution?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 หลายเดือนก่อน

      That's where Aspire becomes a bit tricky to manage, but technically you should be able to reference projects from different solutions and Aspire can run them

  • @itirush2701
    @itirush2701 3 หลายเดือนก่อน

    How use EF and Dapper in one Repository? It’s good practice ? Please make video. 😅

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      You can write Dapper queries on the EF connection

  • @vikasjoshi4708
    @vikasjoshi4708 3 หลายเดือนก่อน

    Hey @Milan, thanks for demonstrating migration, Just to confirm, are you still running postgres and rabbitMQ inside docker.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      I moved Postgres to Azure Postgres

  • @NileshJaiswal_learn
    @NileshJaiswal_learn 3 หลายเดือนก่อน

    Awesome @milan

  • @haraheiquedossantos4283
    @haraheiquedossantos4283 3 หลายเดือนก่อน

    Pretty cool video

  • @pavelromashuk237
    @pavelromashuk237 3 หลายเดือนก่อน +1

    What to do with deployments to containers in clouds? Is there workaround?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +2

      @@pavelromashuk237 Video coming up soon!
      But it's as simple as:
      > azd init
      > azd up
      It'll create a resource group, and deploy each service in Azure Container Apps.

    • @nothingisreal6345
      @nothingisreal6345 3 หลายเดือนก่อน

      In VS there is a publish. Works like a charm

    • @pavelromashuk237
      @pavelromashuk237 3 หลายเดือนก่อน

      @@MilanJovanovicTech Nice. Thanks

    • @RavinduNanayakkara
      @RavinduNanayakkara 3 หลายเดือนก่อน +1

      Good advice from others, if you want some control over the resources created (resource naming in Azure), you can use azd infra synth to generate and modify the bicep templates used by azd.
      Another heads up is that azd up wipes custom domains you set in the Azure portal, you have to opt into a config setting to keep them.

    • @mohammadumar443
      @mohammadumar443 3 หลายเดือนก่อน

      @@MilanJovanovicTech how can we deploy it to our custom vnet to apply different other services to the network ? is it possible to deploy aspire app into custom vnet right now ?

  • @pauljacobson4832
    @pauljacobson4832 2 หลายเดือนก่อน

    How does it work with kubernetes?

    • @MilanJovanovicTech
      @MilanJovanovicTech  2 หลายเดือนก่อน

      It doesn't, for now. ACA is like a managed Kubernetes though

    • @pauljacobson4832
      @pauljacobson4832 2 หลายเดือนก่อน

      I understand, and it seems interesting for a development environment. However, it appears quite limited for a production environment.​@@MilanJovanovicTech

  • @ahmedabdulla3330
    @ahmedabdulla3330 3 หลายเดือนก่อน +1

    Is this deployable to AWS ? Or is Azure only?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      @@ahmedabdulla3330 Azure for now. Unsure about AWS support 🤔

  • @kaozryan
    @kaozryan 3 หลายเดือนก่อน

    Nice! How can i deploy an aspire project? Like to Openshift or Azure.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      Recorded a video, releasing soon!
      TL;DR - Use the Azure Developer CLI
      - azd init // sets up some boilerplate
      - azd up // deploys the app

  • @adambuchanan4090
    @adambuchanan4090 หลายเดือนก่อน

    in the bin folder there's an *.AppHost.exe. is there anyway to "double click that" to run it local?

    • @MilanJovanovicTech
      @MilanJovanovicTech  หลายเดือนก่อน

      This is running locally. What are you trying to achieve?

    • @adambuchanan4090
      @adambuchanan4090 หลายเดือนก่อน

      @@MilanJovanovicTech like not running with having the code side by side. for example in the bin folder double click the *.AppHost.exe and run it. when i double click it. it doesnt work

  • @razbasnet173
    @razbasnet173 3 หลายเดือนก่อน

    What about deployment 🤔

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      Releasing a video on this very soon!

  • @LindenMikus
    @LindenMikus 3 หลายเดือนก่อน

    is this for dotnet compatible projects? what if i have a web app backend in java, frontend angular. can i setup it to run in dockerfile and then plugin to aspire? possible to debug docker containers from aspire?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      Yes, here are a few samples:
      - learn.microsoft.com/en-us/dotnet/aspire/app-host/withdockerfile
      - learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-nodejs
      - learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python

  • @vyteniskajackas7579
    @vyteniskajackas7579 3 หลายเดือนก่อน

    Could you give ideas how to use aspire dashboard on deployed applications? I know this is meant for local development and everything can be acceessed in azure or aws, but I just like the way it looks and presents everything. Lastly, how to properly set up everything, so that "Endpoints" contain the actual application endpoints (to swagger and whatever) for me they are usually empty and when I try to add them using WithHttpEndpoint, they just act weird

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      @@vyteniskajackas7579 Aspire deployment with AZD already sets up the Aspire Dashboard in prod :) Video coming up.

  • @teejstroyer
    @teejstroyer 3 หลายเดือนก่อน

    We have several legacy services that use hardcoded service.env for urls, it possible to set up something similar with aspire? Effectively setting the service name the same way you would with docker compose?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      Yes, grab the MSFT service discovery nuget: learn.microsoft.com/en-us/dotnet/core/extensions/service-discovery?tabs=dotnet-cli

  • @zebrg
    @zebrg 3 หลายเดือนก่อน

    Aspire mixes application with devops. Fine for one man projects but I don't see how this is a good thing for large projects with lots of services running in kubernetes for instance. And, if it does not scale, why not learn "the correct way" from the beginning?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      For large projects, you can use Aspire for the local part and deploy on your own?
      90% (maybe more) of teams don't need kubernetes

  • @xardasu3646
    @xardasu3646 3 หลายเดือนก่อน

    Does Aspire support Node frontend like Next.js ?.

    • @Cheggers-pq1pn
      @Cheggers-pq1pn 3 หลายเดือนก่อน

      Yep. There is a Nodejs hosting package, and a couple examples in the aspire samples of its use on the aspire-samples github repo.

    • @modernkennnern
      @modernkennnern 3 หลายเดือนก่อน +1

      Depends on what you mean by "Support", but it can definitely start, stop, and restart the apps, show telemetry, add environment variables, and add custom commands to next.js applications. We use Aspire on the project I'm working on atm and that's using next.js ( unfortunately..)

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      I think there's a community package that adds support for that

  • @10Totti
    @10Totti 3 หลายเดือนก่อน

    if i want publish project Aspire on my vps ?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +1

      A bit more complicated. We can generate Bicep files and customize them for deployment.

    • @10Totti
      @10Totti 3 หลายเดือนก่อน +1

      @@MilanJovanovicTech So I wonder what's the point of using it only to develop on your own computer?

  • @JevLogin
    @JevLogin หลายเดือนก่อน

    Как это выгрузить на сервер? 😅

    • @MilanJovanovicTech
      @MilanJovanovicTech  หลายเดือนก่อน

      Овако: th-cam.com/video/7FbiDviUsNU/w-d-xo.html

    • @JevLogin
      @JevLogin หลายเดือนก่อน

      @MilanJovanovicTech
      А есть вариант что-то кроме Azure?

  • @KarthikS30712
    @KarthikS30712 3 หลายเดือนก่อน +5

    I trust Milan, not Microsoft.

  • @sunzhang-d9v
    @sunzhang-d9v 3 หลายเดือนก่อน

    Get the source code for this video for FREE ,Unable to run?

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน

      It works fine, what you talking about?

  • @MiningForPies
    @MiningForPies 3 หลายเดือนก่อน +2

    Aspire is very very unstable, and is very likely only going to support dotnet 9, which no serious development team will run in production.

    • @IAmFeO2x
      @IAmFeO2x 3 หลายเดือนก่อน +2

      No, Aspire 9 will be compatible with both .NET 8 and .NET 9 and you are able to orchestrate anything since it can use docker or podman. Either use images from docker hub or any other container registry, or simply write your own dockerfiles. Sure, configuration gets more complicated than with aspire hosting packages, but in the end you can write your own.

    • @MiningForPies
      @MiningForPies 3 หลายเดือนก่อน

      @@IAmFeO2x no, the aspire tooling will stop supporting net 8 when the net 9 version is complete.
      They don’t care for backwards compatibility. It’s not production ready.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +2

      Aspire 9 will work on .NET 8. Where are you getting this from?
      Why wouldn't you run .NET 9 in production? Just one step away from .NET 10...

    • @MiningForPies
      @MiningForPies 3 หลายเดือนก่อน

      @@MilanJovanovicTech anyone that runs an interim version of .net in production is asking for trouble.

    • @MilanJovanovicTech
      @MilanJovanovicTech  3 หลายเดือนก่อน +2

      @@MiningForPies What kind of trouble?