How to specify Site URL?(confused Connectivity Services setup)

Description

I have set up rocket.chat docker-compose method.

$ docker-compose logs rocketchat

rocketchat_1          | ➔ +----------------------------------------------+
rocketchat_1          | ➔ |                SERVER RUNNING                |
rocketchat_1          | ➔ +----------------------------------------------+
rocketchat_1          | ➔ |                                              |
rocketchat_1          | ➔ |  Rocket.Chat Version: 3.7.1                  |
rocketchat_1          | ➔ |       NodeJS Version: 12.18.4 - x64          |
rocketchat_1          | ➔ |      MongoDB Version: 4.0.20                 |
rocketchat_1          | ➔ |       MongoDB Engine: mmapv1                 |
rocketchat_1          | ➔ |             Platform: linux                  |
rocketchat_1          | ➔ |         Process Port: 3000                   |
rocketchat_1          | ➔ |             Site URL: http://localhost:3000  |
rocketchat_1          | ➔ |     ReplicaSet OpLog: Enabled                |
rocketchat_1          | ➔ |          Commit Hash: e37d7ba8ed             |
rocketchat_1          | ➔ |        Commit Branch: HEAD                   |
rocketchat_1          | ➔ |                                              |
rocketchat_1          | ➔ +----------------------------------------------+

Above results are included Site URL: http://localhost:3000 .
But real access URL is https://domain.com (reason: behind nginx proxy).
So this is confused setup Connectivity Services.
Connectivity Services setup are required redirect Site URL(so this case is http://localhost:3000)
but this URL can’t access.
I want to configure Site URL to https://domain.com.
How to?

Server Setup Information

  • Version of Rocket.Chat Server: 3.7.1
  • Operating System: Ubuntu 20.04 LTS
  • Deployment Method: docker (docker-compose)
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.18.4 - x64
  • MongoDB Version: 4.0.20
  • Proxy: nginx
  • Firewalls involved: disabled UFW

Self answer

In docker-compose.yml

services:
  rocketchat:
    image: rocketchat/rocket.chat:latest
    command: >
      bash -c
        "for i in `seq 1 30`; do
          node main.js &&
          s=$$? && break || s=$$?;
          echo \"Tried $$i times. Waiting 5 secs...\";
          sleep 5;
        done; (exit $$s)"
    restart: unless-stopped
    volumes:
      - ./uploads:/app/uploads
    environment:
      - PORT=3000
      - ROOT_URL=https://domain.com

ROOT_URL is control this.
But

  mongo:
    image: mongo:4.0
    restart: unless-stopped
    volumes:
     - ./data/db:/data/db

./data/db remove required this.
(I’m confused that ./data/db must removed)