Help to build a stack for portainer - traefik

I tried to build a stack from grist and traefik to portainer without success, here is my stack, can anyone help me finish?

version: '3'

services:
  grist:
    image: gristlabs/grist:latest
    container_name: grist
    environment:
      - GRIST_FORWARD_AUTH_HEADER=X-Forwarded-User
      - GRIST_FORWARD_AUTH_LOGOUT_PATH=_oauth/logout
      - GRIST_SINGLE_ORG=grist  # alternatively, GRIST_ORG_IN_PATH: "true" for multi-team operation
      - GRIST_DEFAULT_EMAIL=${EMAIL} #ALTERAR
      - APP_HOME_URL=https://${DOMAIN} #ALTERAR

      # - PORT=8080
      # - GRIST_ALLOWED_HOSTS=${DOMAIN} # Replace with webhook target domains
      # - GRIST_DOMAIN=${DOMAIN}
      # - GRIST_HIDE_UI_ELEMENTS=billing
      # - GRIST_LIST_PUBLIC_SITES=false
      # - GRIST_MAX_UPLOAD_ATTACHMENT_MB=10
      # - GRIST_MAX_UPLOAD_IMPORT_MB=300
      # - GRIST_ORG_IN_PATH=false
      # - GRIST_PAGE_TITLE_SUFFIX=_blank
      # - GRIST_FORCE_LOGIN=true
      # - GRIST_SUPPORT_ANON=false
      # - GRIST_THROTTLE_CPU=true

      # - GRIST_SANDBOX_FLAVOR=gvisor
      # - PYTHON_VERSION=3
      # - PYTHON_VERSION_ON_CREATION=3

      # Database
      - TYPEORM_TYPE=postgres
      - TYPEORM_HOST=postgres
      - TYPEORM_DATABASE=grist_db
      - TYPEORM_USERNAME=postgres
      - TYPEORM_LOGGING=false
      - TYPEORM_PASSWORD=senha
      - TYPEORM_PORT=5432

      - POSTGRES_DB=grist_db
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=senha

      # Acesse o postgres e crie o banco de dados
      # psql -U postgres
      # CREATE DATABASE grist_db;  

      - REDIS_URL="redis://redis/4"

    ports:
      - "8484:8484"
    volumes:
      # You may want to put state somewhere other than /tmp :-)
      - /tmp/grist/data:/persist
    deploy:
      # O editor será executado no modo de replicação
      mode: replicated
      # Vamos ter apenas uma instância do editor
      replicas: 1
      # Configura o local de execução
      placement:
        constraints:
          # Você pode rodar o Editor no Manager mesmo pois usa poucos recursos
          - node.role == dsantana-manager1
          - node.hostname == dsantana-manager1
          # - node.labels.app == http # nome do label: app, valor do label: http
      # Limitação
      resources:
        # Definição dos Limites de Recursos deste Serviço
        limits:
          # Define a quantidade de CPU para o CodeChat para evitar travamento do Host
          cpus: "1"
          # Define a quantidade de RAM para o CodeChat para evitar travamento do Host
          memory: 1024M
    labels:
      - traefik.enable=true
      - traefik.http.services.grist.loadbalancer.server.port=8484

      # When logging in, use traefik-forward-auth middleware.
      - traefik.http.routers.login.rule=Host(`${DOMAIN}`) && PathPrefix(`/auth/login`) #ALTERAR
      - traefik.http.routers.login.middlewares=traefik-forward-auth
      - traefik.http.routers.login.service=grist
      # Comment out each line with "letsencypt" in it if your domain is not publically
      # accessible and you want to use a self-signed certificate.
      - traefik.http.routers.login.tls.certresolver=letsencrypt

      # traefik-forward-auth middleware itself has some internal endpoints.
      - traefik.http.routers.auth.rule=Host(`${DOMAIN}`) && PathPrefix(`/_oauth`) #ALTERAR
      - traefik.http.routers.auth.middlewares=traefik-forward-auth
      - traefik.http.routers.auth.service=grist
      - traefik.http.routers.auth.tls.certresolver=letsencrypt

      # Otherwise, the middleware is not needed and would prevent
      # public shares. Grist will redirect to login when needed.
      - traefik.http.routers.general.rule=Host(`${DOMAIN}`) #ALTERAR
      - traefik.http.routers.general.service=grist
      - traefik.http.routers.general.tls.certresolver=letsencrypt

      # - traefik.http.routers.grist.rule=Host(`${DOMAIN}`)
      # - traefik.http.routers.grist.entrypoints=websecure
      # - traefik.http.routers.grist.priority=1
      # - traefik.http.routers.grist.tls.certresolver=letsencryptresolver
      # - traefik.http.routers.grist.service=grist
      # - traefik.http.services.grist.loadbalancer.server.port=8484
      # - traefik.http.services.grist.loadbalancer.passHostHeader=1
```