Open Closed

(REQUEST) Working Abp Docker https example project #1586


User avatar
0
gvnuysal created
  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core
    • Tiered (MVC) or Identity Server Separated (Angular): no

Hi support, We have working project on IIS without any problem but when we created docker image of our project it only runs on http protocol.We tried to implement and configure kestrel but we could not manage to do it.Could you provide working https project example running on docker?


5 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This actually not related to ABP, you can check this: https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-5.0

  • User Avatar
    0
    gvnuysal created

    Hi liangshiwei, We already read and tried every article about it in microsoft and stackoverflow. That article you shared is a great solution and works perfectly if you create a project WITHOUT APB. But when the ABP project was created, it was not a solution. In my opinion it is related to the "XYZHttpApiHostModue.cs" class that ABP creates. There must be a setting to add it or modify it but we couldn't manage to do that. That's why we asked for an example project that you already made that settings so that we can refer to. Also we tried to implement Kestrel but we couldn't manage to work it with ABP.

    So If you could share an example or settings that would be much appreciated.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Okay, I will check it out.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I have successfully used HTTPS in Docker.

    dockerfile:

    FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
    WORKDIR /app
    EXPOSE 80
    EXPOSE 443
    COPY . .
    ENTRYPOINT ["dotnet", "Qa1586.Web.dll"]
    

    Generate local certificates:

    dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p 123456
    dotnet dev-certs https --trust
    

    docker run command:

     docker run --name qa -v D:/coding:/var/https -e ASPNETCORE_Kestrel__Certificates__Default__Password=123456 -e ASPNETCORE_Kestrel__Certificates__Default__Path=/var/https/aspnetapp.pfx -e ASPNETCORE_URLS='https://+:443;http://+:80' -p 44320:80 -p 44321:443 qa1586
    

    it works well

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11