502 Bad gate after install via docker-compose [Solved]

version: '2'
services:
  db:
    image: mariadb:10.5
    container_name: seafile-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=my_pw  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /opt/seafile-mysql/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net

  memcached:
    image: memcached:1.5.6
    container_name: seafile-memcached
    entrypoint: memcached -m 256
    networks:
      - seafile-net
          
  seafile:
    image: seafileltd/seafile-mc:latest
    container_name: seafile
    ports:
      - "8090:80"
#     - "443:443"  # If https is enabled, cancel the comment.
    volumes:
      - /opt/seafile-data:/shared   # Requested, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=my_pw  # Requested, the value shuold be root's password of MySQL service.
      - TIME_ZONE=Etc/UTC  # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - SEAFILE_ADMIN_EMAIL=star@ouk.com # Specifies Seafile admin user, default is 'me@example.com'.
      - SEAFILE_ADMIN_PASSWORD=my_pw     # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=false   # Whether to use https or not.
      - SEAFILE_SERVER_HOSTNAME=cloud.malacology.net # Specifies your host name if https is enabled.
    depends_on:
      - db
      - memcached
    networks:
      - seafile-net

networks:
  seafile-net:

The above is the docker-compose.yml
My system is Ubuntu 18
The logs of seafile container is below.

runtime.throw(0x5623129559e2, 0x16)
	/usr/local/go/src/runtime/panic.go:774 +0x74 fp=0x7ffce5a279e8 sp=0x7ffce5a279b8 pc=0x562311392f34
runtime.sysMap(0xc000000000, 0x4000000, 0x562314631d98)
	/usr/local/go/src/runtime/mem_linux.go:169 +0xc7 fp=0x7ffce5a27a28 sp=0x7ffce5a279e8 pc=0x56231137c8e7
runtime.(*mheap).sysAlloc(0x5623146189c0, 0x2000, 0x0, 0x0)
	/usr/local/go/src/runtime/malloc.go:701 +0x1cf fp=0x7ffce5a27ad0 sp=0x7ffce5a27a28 pc=0x56231136f7ef
runtime.(*mheap).grow(0x5623146189c0, 0x1, 0xffffffff)
	/usr/local/go/src/runtime/mheap.go:1255 +0xa5 fp=0x7ffce5a27b20 sp=0x7ffce5a27ad0 pc=0x56231138aa85
runtime.(*mheap).allocSpanLocked(0x5623146189c0, 0x1, 0x562314631da8, 0x1)
	/usr/local/go/src/runtime/mheap.go:1170 +0x268 fp=0x7ffce5a27ba0 sp=0x7ffce5a27b20 pc=0x56231138a918
runtime.(*mheap).alloc_m(0x5623146189c0, 0x1, 0x5623113b002a, 0x0)
	/usr/local/go/src/runtime/mheap.go:1022 +0xc6 fp=0x7ffce5a27bf0 sp=0x7ffce5a27ba0 pc=0x56231138a1b6
runtime.(*mheap).alloc.func1()
	/usr/local/go/src/runtime/mheap.go:1093 +0x4e fp=0x7ffce5a27c28 sp=0x7ffce5a27bf0 pc=0x5623113bc4ce
runtime.(*mheap).alloc(0x5623146189c0, 0x1, 0x1002a, 0x40000)
	/usr/local/go/src/runtime/mheap.go:1092 +0x8c fp=0x7ffce5a27c78 sp=0x7ffce5a27c28 pc=0x56231138a49c
runtime.(*mcentral).grow(0x5623146197f8, 0x0)
	/usr/local/go/src/runtime/mcentral.go:255 +0x7d fp=0x7ffce5a27cb8 sp=0x7ffce5a27c78 pc=0x56231137c30d
runtime.(*mcentral).cacheSpan(0x5623146197f8, 0x7f684b0bf000)
	/usr/local/go/src/runtime/mcentral.go:106 +0x300 fp=0x7ffce5a27d18 sp=0x7ffce5a27cb8 pc=0x56231137be30
runtime.(*mcache).refill(0x7f684b0bf008, 0x2a)
	/usr/local/go/src/runtime/mcache.go:138 +0x87 fp=0x7ffce5a27d38 sp=0x7ffce5a27d18 pc=0x56231137b8c7
runtime.(*mcache).nextFree(0x7f684b0bf008, 0x562314631d2a, 0x7f684b0bf008, 0x8, 0xfffffffffffffff8)
	/usr/local/go/src/runtime/malloc.go:854 +0x89 fp=0x7ffce5a27d70 sp=0x7ffce5a27d38 pc=0x562311370019
runtime.mallocgc(0x180, 0x56231355c8a0, 0x1, 0x562314631e00)
	/usr/local/go/src/runtime/malloc.go:1022 +0x7a5 fp=0x7ffce5a27e10 sp=0x7ffce5a27d70 pc=0x562311370965
runtime.newobject(0x56231355c8a0, 0x4000)
	/usr/local/go/src/runtime/malloc.go:1151 +0x3a fp=0x7ffce5a27e40 sp=0x7ffce5a27e10 pc=0x562311370d6a
runtime.malg(0x162300008000, 0x56231461b068)
	/usr/local/go/src/runtime/proc.go:3238 +0x33 fp=0x7ffce5a27e80 sp=0x7ffce5a27e40 pc=0x56231139c4c3
runtime.mpreinit(...)
	/usr/local/go/src/runtime/os_linux.go:324
runtime.mcommoninit(0x562314612c80)
	/usr/local/go/src/runtime/proc.go:626 +0xc6 fp=0x7ffce5a27eb8 sp=0x7ffce5a27e80 pc=0x562311395cf6
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:543 +0x76 fp=0x7ffce5a27f10 sp=0x7ffce5a27eb8 pc=0x562311395956
runtime.rt0_go(0x7ffce5a28018, 0x3, 0x7ffce5a28018, 0x0, 0x7f684a6f0bf7, 0x3, 0x7ffce5a28018, 0x300008000, 0x5623113be820, 0x0, ...)
	/usr/local/go/src/runtime/asm_amd64.s:214 +0x129 fp=0x7ffce5a27f18 sp=0x7ffce5a27f10 pc=0x5623113be959

database logs

runtime stack:
runtime.throw(0x562fff1789e2, 0x16)
	/usr/local/go/src/runtime/panic.go:774 +0x74 fp=0x7ffe5df51188 sp=0x7ffe5df51158 pc=0x562ffdbb5f34
runtime.sysMap(0xc000000000, 0x4000000, 0x563000e54d98)
	/usr/local/go/src/runtime/mem_linux.go:169 +0xc7 fp=0x7ffe5df511c8 sp=0x7ffe5df51188 pc=0x562ffdb9f8e7
runtime.(*mheap).sysAlloc(0x563000e3b9c0, 0x2000, 0x0, 0x0)
	/usr/local/go/src/runtime/malloc.go:701 +0x1cf fp=0x7ffe5df51270 sp=0x7ffe5df511c8 pc=0x562ffdb927ef
runtime.(*mheap).grow(0x563000e3b9c0, 0x1, 0xffffffff)
	/usr/local/go/src/runtime/mheap.go:1255 +0xa5 fp=0x7ffe5df512c0 sp=0x7ffe5df51270 pc=0x562ffdbada85
runtime.(*mheap).allocSpanLocked(0x563000e3b9c0, 0x1, 0x563000e54da8, 0x1)
	/usr/local/go/src/runtime/mheap.go:1170 +0x268 fp=0x7ffe5df51340 sp=0x7ffe5df512c0 pc=0x562ffdbad918
runtime.(*mheap).alloc_m(0x563000e3b9c0, 0x1, 0x562ffdbd002a, 0x0)
	/usr/local/go/src/runtime/mheap.go:1022 +0xc6 fp=0x7ffe5df51390 sp=0x7ffe5df51340 pc=0x562ffdbad1b6
runtime.(*mheap).alloc.func1()
	/usr/local/go/src/runtime/mheap.go:1093 +0x4e fp=0x7ffe5df513c8 sp=0x7ffe5df51390 pc=0x562ffdbdf4ce
runtime.(*mheap).alloc(0x563000e3b9c0, 0x1, 0x1002a, 0x40000)
	/usr/local/go/src/runtime/mheap.go:1092 +0x8c fp=0x7ffe5df51418 sp=0x7ffe5df513c8 pc=0x562ffdbad49c
runtime.(*mcentral).grow(0x563000e3c7f8, 0x0)
	/usr/local/go/src/runtime/mcentral.go:255 +0x7d fp=0x7ffe5df51458 sp=0x7ffe5df51418 pc=0x562ffdb9f30d
runtime.(*mcentral).cacheSpan(0x563000e3c7f8, 0x7f86641a2000)
	/usr/local/go/src/runtime/mcentral.go:106 +0x300 fp=0x7ffe5df514b8 sp=0x7ffe5df51458 pc=0x562ffdb9ee30
runtime.(*mcache).refill(0x7f86641a2008, 0x2a)
	/usr/local/go/src/runtime/mcache.go:138 +0x87 fp=0x7ffe5df514d8 sp=0x7ffe5df514b8 pc=0x562ffdb9e8c7
runtime.(*mcache).nextFree(0x7f86641a2008, 0x563000e54d2a, 0x7f86641a2008, 0x8, 0xfffffffffffffff8)
	/usr/local/go/src/runtime/malloc.go:854 +0x89 fp=0x7ffe5df51510 sp=0x7ffe5df514d8 pc=0x562ffdb93019
runtime.mallocgc(0x180, 0x562fffd7f8a0, 0x1, 0x563000e54e00)
	/usr/local/go/src/runtime/malloc.go:1022 +0x7a5 fp=0x7ffe5df515b0 sp=0x7ffe5df51510 pc=0x562ffdb93965
runtime.newobject(0x562fffd7f8a0, 0x4000)
	/usr/local/go/src/runtime/malloc.go:1151 +0x3a fp=0x7ffe5df515e0 sp=0x7ffe5df515b0 pc=0x562ffdb93d6a
runtime.malg(0x172500008000, 0x563000e3e068)
	/usr/local/go/src/runtime/proc.go:3238 +0x33 fp=0x7ffe5df51620 sp=0x7ffe5df515e0 pc=0x562ffdbbf4c3
runtime.mpreinit(...)
	/usr/local/go/src/runtime/os_linux.go:324
runtime.mcommoninit(0x563000e35c80)
	/usr/local/go/src/runtime/proc.go:626 +0xc6 fp=0x7ffe5df51658 sp=0x7ffe5df51620 pc=0x562ffdbb8cf6
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:543 +0x76 fp=0x7ffe5df516b0 sp=0x7ffe5df51658 pc=0x562ffdbb8956
runtime.rt0_go(0x7ffe5df517b8, 0x3, 0x7ffe5df517b8, 0x0, 0x7f86637d3bf7, 0x3, 0x7ffe5df517b8, 0x300008000, 0x562ffdbe1820, 0x0, ...)
	/usr/local/go/src/runtime/asm_amd64.s:214 +0x129 fp=0x7ffe5df516b8 sp=0x7ffe5df516b0 pc=0x562ffdbe1959

My nginx configure

server {
            listen 80;
            server_name cloud.malacology.net;
            return 301 https://$server_name$request_uri;
}
server {
    listen 443;
    server_name cloud.malacology.net;
    ssl_certificate /etc/ssl/cloud/1_cloud.malacology.net_bundle.crt;
    ssl_certificate_key /etc/ssl/cloud/2_cloud.malacology.net.key;
    ssl on;
    ssl_session_cache builtin:1000 shared:SSL:10m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
    ssl_prefer_server_ciphers on;
    access_log /var/log/nginx/access.log;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://120.xxxxx:8090;
        proxy_read_timeout 90;
        proxy_redirect http://120.77.xxxxx:8090 https://cloud.malacology.net;
    }
}

But it returns 502
Now it’s okay. So happy, need wait a minute