[Self-hosted] Nocodb stack in portainer

I paste here what worked for me to install Nocodb as a stack in Portainer, in case it helps any person who needs to do the same. Notice i placed xxxx in places you need to change information (postgres password, domain, network)

version: '3.7'
services:
  nocodb:
    image: nocodb/nocodb:latest
    volumes:
      - nocodb_nocodb_db_data2:/usr/app/data
    networks:
      - changenamexxxx_yournetwork
    environment:
      - NC_DB=pg://postgres:5432?u=postgres&p=xxxxxxxxxxpasswordpostgresxxxxxxxxx&d=nocodb
      - NC_PUBLIC_URL=https://changename.xxxxxxx.com
      - NC_DISABLE_TELE=true
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints: 
          - node.role == manager
      resources:
        limits:
          cpus: "1"
          memory: "1G" 
      labels:
        - traefik.enable=true
        - traefik.http.routers.nocodb.rule=Host(`changename.xxxxxxx.com`)
        - traefik.http.routers.nocodb.entrypoints=websecure
        - traefik.http.routers.nocodb.tls=true
        - traefik.http.routers.nocodb.tls.certresolver=le
        - traefik.http.services.nocodb.loadbalancer.server.port=8080
        - traefik.http.services.nocodb.loadbalancer.passHostHeader=true
        - traefik.http.routers.nocodb.priority=1
        - traefik.http.routers.nocodb.service=nocodb
volumes:
  nocodb_nocodb_db_data2:
    driver: local
    name: nocodb_db_data2

networks:
  changenamexxxx_yournetwork:
    external: true
  

Thanks @Naomi
Welcome to NocoDB community.

this is really helpful