Need help installing docker medcat trainer

ubuntu 20.04 (from WSL)
medcat-trainer 2.13
docker 23.0.3
30+ GB RAM

Hi all
I have problems while installing Medcat trainer from docker. After docker compose up, containers are running but there are a ton of errors in the output:

medcattrainer-medcattrainer-1            | --- no python application found, check your startup logs for errors ---
medcattrainer-medcattrainer-1            | [pid: 54|app: -1|req: -1/15] 127.0.0.1 () {32 vars in 379 bytes} [Sat Nov 25 22:57:45 2023] GET /api/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

I cannot connect to the trainer web interface on port 8001. A second install on an other machine gives the same error, and I can not contact the trainer as well (but other containers (e.g. medcat) are functional).
ss -lnt shows that ports are listening
I feel really stupid, am I missing something?
regards,
Tom

Is there any more from the logs you can share?

Yes certainly. I did not want to post all of the logs in my initial question. Any particular container log you are interersted in? The log I posted is repeated every minute or so.

The following block of log entries keeps repeating itself during startup. Apparently, a table is missing:
sqlite3.OperationalError: no such table: api_projectannotateentities. Later, only the error in my previous post is logged.

INFO 2023-11-27 08:44:16,711 apps.py l:17:Found env var RESUBMIT_ALL_ON_STARTUP is True. Attempting to resubmit all currently submitted state documents
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 383, in execute
    return Database.Cursor.execute(self, query, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: api_projectannotateentities

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/api/manage.py", line 21, in <module>
    main()
  File "/home/api/manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/usr/local/lib/python3.11/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/api/api/apps.py", line 20, in ready
    for project in projects:
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 274, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 1242, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/polymorphic/query.py", line 58, in _polymorphic_iterator
    o = next(base_iter)
        ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 55, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 99, in execute
    return super().execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
    return executor(sql, params, many, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute
    with self.db.wrap_database_errors:
  File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py", line 383, in execute
    return Database.Cursor.execute(self, query, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
django.db.utils.OperationalError: no such table: api_projectannotateentities

After reading this post I changed the RESUBMIT_ALL_ON_STARTUP environment variable to 0, stopped , removed and restarted the containers. The errors are gone but I still cannot contact the webinterface:
The browsers reports a SSL protocol error and the log:

medcattrainer-medcattrainer-1            | Checking for default projects / datasets / CDBs / Vocabs
medcattrainer-medcattrainer-1            | Found No Objects. Populating Example: Concept DB, Vocabulary, Dataset and Project...
medcattrainer-medcattrainer-1            | Downloading example UMLS CDB...
medcattrainer-medcattrainer-1            | Downloading example SNOMED CT CDB...
medcattrainer-medcattrainer-1            | Downloading example vocab...
medcattrainer-medcattrainer-1            | Downloading example dataset
medcattrainer-medcattrainer-1            | Creating CDB / Vocab / Dataset / Project in the Trainer
medcattrainer-medcattrainer-1            | Successfully created the example project
medcattrainer-medcattrainer-1            | Creating CDB / Vocab / Dataset / Project in the Trainer
medcattrainer-medcattrainer-1            | Successfully created the example project
medcattrainer-nginx-1                    | 192.168.40.1 - - [27/Nov/2023:10:54:34 +0000] "\x16\x03\x01\x02\x1A\x01\x00\x02\x16\x03\x03\xB4\xF8D\xE1\x93\xB3\xA6w!\x11\xDAt\x9Ex\x5Co\xC8\xCDNx\xA5\xE3\xFA>7\x82F\x99\xDE8\x06\x1D \x94\x86\xBA\xB0hVOx0ax\xECq\x11\xD3r\x98\xD0s'{\x22\xD5\xB6\x09E\xA5U\xC0\xB03\xF7\x00 \xEA\xEA\x13\x01\x13\x02\x13\x03\xC0+\xC0/\xC0,\xC00\xCC\xA9\xCC\xA8\xC0\x13\xC0\x14\x00\x9C\x00\x9D\x00/\x005\x01\x00\x01\xADjj\x00\x00\x00-\x00\x02\x01\x01\x00" 400 150 "-" "-"
medcattrainer-nginx-1                    | 192.168.40.1 - - [27/Nov/2023:10:54:34 +0000] "\x16\x03\x01\x02:\x01\x00\x026\x03\x03m\x8B\xFC\x94\xA9(g~a&Z\xBAW\x92\xB7r\x8FA\xEC\x86k\xDCtn\x90A\xA2OHCrW uIp.Y\xEFfG\x1D\xB6\x7FT\xA8\xFA\xEE\x9E\x1C\xBC\x14\x93\xA6\xE7\x89\xDF\x82\xF3\xA0" 400 150 "-" "-"

Apologies, I am really stupid. It is not SSL. With http (without ‘s’) , I get a login page.

Conclusion: The defaultvalue for RESUBMIT_ALL_ON_STARTUP should be ‘0’ and not ‘1’?