How to add a self signed SSL CErtificate to my docker on Synology DSM?

Nextcloud version (eg, 20.0.5): 27.1.4
Operating system and version (eg, Ubuntu 20.04): Synology DSM 7.2 U3

docker-compose.yml:

version: '2'

volumes:
  # nextcloud:
  db:

services:
  db:
    image: mariadb:lts
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=****
      - MYSQL_PASSWORD=****
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    restart: always
    ports:
      - 8082:80
    links:
      - db
    volumes:
      - /volume1/docker/nextcloud/data:/var/www/html/data
      - /volume1/docker/nextcloud/config:/var/www/html/config
      - /volume1/docker/nextcloud/custom_apps:/var/www/html/custom_apps
      
    environment:
      - MYSQL_PASSWORD=****
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

The issue you are facing:

Fehlercode: SSL_ERROR_RX_RECORD_TOO_LONG

    Die Website kann nicht angezeigt werden, da die Authentizität der erhaltenen Daten nicht verifiziert werden konnte.
    Kontaktieren Sie bitte den Inhaber der Website, um ihn über dieses Problem zu informieren.

Steps to replicate it:

  1. run the mentioned cocker-compose.yml
  2. try to connect with https://