How to enable HTTPS in my docker container

I have a docker container which contains an ASP.NET core 6 MVC application and locally I run it with
ASPNETCORE_Kestrel__Certificates__Default__Path
and
ASPNETCORE_Kestrel__Certificates__Default__Password
environmental variables set in docker compose that points to the volume where the certifcate is located, this way the HTTPS is served from docker container.

a simple docker compose such as below

version: '3.4'

services:
  webapp:
    image: rrs.net
    ports:
      - 80
      - 443
    environment:
      - ASPNETCORE_ENVIRONMENT=Development
      - ASPNETCORE_URLS=https://+:443;http://+:80
      - ASPNETCORE_Kestrel__Certificates__Default__Password=1234
      - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
    volumes:
      - ~/.aspnet/https:/https:ro

How is this done when using Rancher?
I have tried to go over the menus and option i can see that i can set the environment variables and I can mount a volume, so How can I copy/upload the certificate to that volume (im not sure if this is the way)?

Or general question is, how can I do this in rancher?