Skip to content

Conversation

@falquaddoomi
Copy link
Collaborator

This PR adds the following:

  • implements the entire meta2onto API (sorry, probably should've broken it up...)
  • updates endpoint paths, field references in the frontend to match the backend
  • adds a facility for the database to load the latest dump on startup, similar to ECCO
  • downloads the latest database dump if it's not already present on invoking run_stack.sh
    • note that the dump is currently around 850mb and I expect that to grow
    • if it's missing or doesn't match the remote's exact file size in bytes (I presume this is enough to ensure it's different), you'll be prompted with a message to download it that includes its actual remote size
  • adds memcached for caching expensive responses

Regarding the frontend, here are a few significant changes:

  • the Cart component now directly downloads the response from /api/cart/download rather than getting a link and fetching that
  • the Autocomplete listing now shows the ontology ID alongside the result (feel free to remove if you like; that was mostly for me); it also passes the entity's name to the search page rather than its ID to match the mockup.
    • I vaguely recall them saying that they wanted to select an ontology ID from the list, but perhaps that's not the case? Right now, the search will match multiple ontology entities as long as their names are the same.
    • The initial results are currently capped at 50, but due to some joins that exclude the actual number of results can end up winnowing it down to ~47. I'm looking into it return exactly as many results as you ask for while not blowing up the size early in the query.
  • Search and Cart were updated to reflect the field names I return from the backend

Caveats

Note that the backend API structure is very much a work in progress. For example, I'd like to combine the GEO metadata series table with the regular Series table, decide between whether it's going to be flat or nested, normalize how queries and pagination are done (there are some custom endpoints, for example), etc. There's also currently no formal type definition for the API; I intend to add that, as well as Swagger or ReDoc to surface that information better, as well as add an OpenAPI schema endpoint for programmatic use.

The data model is also kind of all over the place, due to not knowing how (or, in many cases, if) the data i was provided would be used in the app. I have a lot of cleanup to do both on the model and the interface, but I imagine that it'll be best to address it in a future PR.

The way that searches are conducted is currently complicated, but I figure I should get the PR out first. I'll explain it in a subsequent comment on this PR.

Trying it Out

Since I was only given a subset of ontology terms for testing, only a small subset of entities in the ontology will actually be able to be matched to results. (They're all disease entities from the MONDO ontology, and only a small selection of them at that.) Here's a few entries that you can search for that actually return responses, pulled from the api_searchterms table joined with api_ontologyterms:

Ontology ID Query Phrase
MONDO:0000270 lower respiratory tract disorder
MONDO:0000637 musculoskeletal system cancer
MONDO:0001416 female reproductive organ cancer

@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for m2on failed.

Name Link
🔨 Latest commit 4cd1d72
🔍 Latest deploy log https://app.netlify.com/projects/m2on/deploys/695c25a9127af600082de5c9

@vincerubinetti
Copy link
Collaborator

I took a quick look. Starting the containers from scratch, I ran into some issues. I had to manually start the frontend/backend containers, and when I did, the backend was throwing some errors, pasted below:

shell log dump
2025-12-13 19:17:32 frontend-1   | $ vite --open --host "0.0.0.0" --port "5173" --no-open
2025-12-13 19:17:33 frontend-1   | 12:17:33 AM [vite] (client) Re-optimizing dependencies because vite config has changed
2025-12-13 19:17:33 frontend-1   | 
2025-12-13 19:17:33 frontend-1   |   VITE v7.1.12  ready in 383 ms
2025-12-13 19:17:33 frontend-1   | 
2025-12-13 19:17:33 frontend-1   |   ➜  Local:   http://localhost:5173/
2025-12-13 19:17:33 frontend-1   |   ➜  Network: http://172.19.0.4:5173/
2025-12-13 19:18:00 frontend-1   | [baseline-browser-mapping] The data in this module is over two months old.  To ensure accurate Baseline data, please update: `npm i baseline-browser-mapping@latest -D`
2025-12-13 19:17:36 backend-1    | * Applying database migrations
2025-12-13 19:17:38 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:38 backend-1    |     self.connect()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:38 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:38 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:38 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:38 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:38 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:38 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:38 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:17:38 backend-1    | 
2025-12-13 19:17:38 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:17:38 backend-1    | 
2025-12-13 19:17:38 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:38 backend-1    |   File "/app/src/./manage.py", line 22, in <module>
2025-12-13 19:17:38 backend-1    |     main()
2025-12-13 19:17:38 backend-1    |   File "/app/src/./manage.py", line 18, in main
2025-12-13 19:17:38 backend-1    |     execute_from_command_line(sys.argv)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2025-12-13 19:17:38 backend-1    |     utility.execute()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
2025-12-13 19:17:38 backend-1    |     self.fetch_command(subcommand).run_from_argv(self.argv)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
2025-12-13 19:17:38 backend-1    |     self.execute(*args, **cmd_options)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 460, in execute
2025-12-13 19:17:38 backend-1    |     output = self.handle(*args, **options)
2025-12-13 19:17:38 backend-1    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 107, in wrapper
2025-12-13 19:17:38 backend-1    |     res = handle_func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 114, in handle
2025-12-13 19:17:38 backend-1    |     executor = MigrationExecutor(connection, self.migration_progress_callback)
2025-12-13 19:17:38 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:17:38 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:17:38 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:17:38 backend-1    |     self.build_graph()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:17:38 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:17:38 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:17:38 backend-1    |     if self.has_table():
2025-12-13 19:17:38 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:17:38 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:17:38 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:17:38 backend-1    |     return self._cursor()
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:17:38 backend-1    |     self.ensure_connection()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:17:38 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:17:38 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:17:38 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:38 backend-1    |     self.connect()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:38 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:38 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:38 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:38 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:38 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:38 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:38 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:17:38 backend-1    | * Creating superuser account if it doesn't exist
2025-12-13 19:17:38 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:38 backend-1    |     self.connect()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:38 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:38 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:38 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:38 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:38 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:38 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:38 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:17:38 backend-1    | 
2025-12-13 19:17:38 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:17:38 backend-1    | 
2025-12-13 19:17:38 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:38 backend-1    |   File "/app/src/./manage.py", line 22, in <module>
2025-12-13 19:17:38 backend-1    |     main()
2025-12-13 19:17:38 backend-1    |   File "/app/src/./manage.py", line 18, in main
2025-12-13 19:17:38 backend-1    |     execute_from_command_line(sys.argv)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2025-12-13 19:17:38 backend-1    |     utility.execute()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
2025-12-13 19:17:38 backend-1    |     self.fetch_command(subcommand).run_from_argv(self.argv)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
2025-12-13 19:17:38 backend-1    |     self.execute(*args, **cmd_options)
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 90, in execute
2025-12-13 19:17:38 backend-1    |     return super().execute(*args, **options)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
2025-12-13 19:17:38 backend-1    |     self.check_migrations()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 587, in check_migrations
2025-12-13 19:17:38 backend-1    |     executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
2025-12-13 19:17:38 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:17:38 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:17:38 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:17:38 backend-1    |     self.build_graph()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:17:38 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:17:38 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:17:38 backend-1    |     if self.has_table():
2025-12-13 19:17:38 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:17:38 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:17:38 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:17:38 backend-1    |     return self._cursor()
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:17:38 backend-1    |     self.ensure_connection()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:17:38 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:17:38 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:17:38 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:38 backend-1    |     self.connect()
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:38 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:38 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:38 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:38 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:38 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:38 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:38 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:38 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:38 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:38 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:17:38 backend-1    | * Collecting static files
2025-12-13 19:17:39 backend-1    | 
2025-12-13 19:17:39 backend-1    | 163 static files copied to '/opt/static'.
2025-12-13 19:17:39 backend-1    | * Serving via django runserver (debug mode)
2025-12-13 19:17:39 backend-1    | Watching for file changes with StatReloader
2025-12-13 19:17:39 backend-1    | Exception in thread django-main-thread:
2025-12-13 19:17:39 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:39 backend-1    |     self.connect()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:39 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:39 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:39 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:39 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:39 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:39 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:39 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:17:39 backend-1    | 
2025-12-13 19:17:39 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:17:39 backend-1    | 
2025-12-13 19:17:39 backend-1    | Traceback (most recent call last):
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
2025-12-13 19:17:39 backend-1    |     self.run()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/threading.py", line 1012, in run
2025-12-13 19:17:39 backend-1    |     self._target(*self._args, **self._kwargs)
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper
2025-12-13 19:17:39 backend-1    |     fn(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 137, in inner_run
2025-12-13 19:17:39 backend-1    |     self.check_migrations()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 587, in check_migrations
2025-12-13 19:17:39 backend-1    |     executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
2025-12-13 19:17:39 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:17:39 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:17:39 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:17:39 backend-1    |     self.build_graph()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:17:39 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:17:39 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:17:39 backend-1    |     if self.has_table():
2025-12-13 19:17:39 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:17:39 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:17:39 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:17:39 backend-1    |     return self._cursor()
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:17:39 backend-1    |     self.ensure_connection()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:17:39 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:17:39 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:17:39 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:17:39 backend-1    |     self.connect()
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:17:39 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:17:39 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:17:39 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:17:39 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:17:39 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:17:39 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:17:39 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:17:39 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:17:39 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:17:39 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:07 backend-1    | * Applying database migrations
2025-12-13 19:13:45 db-1         | The files belonging to this database system will be owned by user "postgres".
2025-12-13 19:13:45 db-1         | This user must also own the server process.
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | The database cluster will be initialized with locale "en_US.utf8".
2025-12-13 19:13:45 db-1         | The default database encoding has accordingly been set to "UTF8".
2025-12-13 19:13:45 db-1         | The default text search configuration will be set to "english".
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | Data page checksums are disabled.
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | fixing permissions on existing directory /var/lib/postgresql/data ... ok
2025-12-13 19:13:45 db-1         | creating subdirectories ... ok
2025-12-13 19:13:45 db-1         | selecting dynamic shared memory implementation ... posix
2025-12-13 19:13:45 db-1         | selecting default "max_connections" ... 100
2025-12-13 19:13:45 db-1         | selecting default "shared_buffers" ... 128MB
2025-12-13 19:13:45 db-1         | selecting default time zone ... Etc/UTC
2025-12-13 19:13:45 db-1         | creating configuration files ... ok
2025-12-13 19:13:45 db-1         | running bootstrap script ... ok
2025-12-13 19:13:45 db-1         | performing post-bootstrap initialization ... ok
2025-12-13 19:13:45 db-1         | syncing data to disk ... ok
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | Success. You can now start the database server using:
2025-12-13 19:13:45 db-1         | initdb: warning: enabling "trust" authentication for local connections
2025-12-13 19:13:45 db-1         | initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         |     pg_ctl -D /var/lib/postgresql/data -l logfile start
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | waiting for server to start....2025-12-14 00:13:45.774 UTC [49] LOG:  starting PostgreSQL 17.7 (Debian 17.7-3.pgdg13+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.775 UTC [49] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.777 UTC [52] LOG:  database system was shut down at 2025-12-14 00:13:45 UTC
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.779 UTC [49] LOG:  database system is ready to accept connections
2025-12-13 19:13:45 db-1         |  done
2025-12-13 19:13:45 db-1         | server started
2025-12-13 19:13:45 db-1         | CREATE DATABASE
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/01.add_extensions.sql
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | 
2025-12-13 19:13:45 db-1         | waiting for server to shut down....2025-12-14 00:13:45.960 UTC [49] LOG:  received fast shutdown request
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.961 UTC [49] LOG:  aborting any active transactions
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.962 UTC [49] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.962 UTC [50] LOG:  shutting down
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.963 UTC [50] LOG:  checkpoint starting: shutdown immediate
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.990 UTC [50] LOG:  checkpoint complete: wrote 925 buffers (5.6%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.008 s, sync=0.018 s, total=0.028 s; sync files=301, longest=0.006 s, average=0.001 s; distance=4256 kB, estimate=4256 kB; lsn=0/1915950, redo lsn=0/1915950
2025-12-13 19:13:45 db-1         | 2025-12-14 00:13:45.992 UTC [49] LOG:  database system is shut down
2025-12-13 19:13:46 db-1         |  done
2025-12-13 19:13:46 db-1         | server stopped
2025-12-13 19:13:46 db-1         | 
2025-12-13 19:13:46 db-1         | PostgreSQL init process complete; proceeding to post-init...
2025-12-13 19:13:46 db-1         | 
2025-12-13 19:13:46 db-1         | waiting for server to start....2025-12-14 00:13:46.081 UTC [69] LOG:  starting PostgreSQL 17.7 (Debian 17.7-3.pgdg13+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-12-13 19:13:46 db-1         | 2025-12-14 00:13:46.081 UTC [69] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-12-13 19:13:46 db-1         | 2025-12-14 00:13:46.084 UTC [72] LOG:  database system was shut down at 2025-12-14 00:13:45 UTC
2025-12-13 19:13:46 db-1         | 2025-12-14 00:13:46.086 UTC [69] LOG:  database system is ready to accept connections
2025-12-13 19:13:46 db-1         |  done
2025-12-13 19:13:46 db-1         | server started
2025-12-13 19:13:46 db-1         | 
2025-12-13 19:13:46 db-1         | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-postinit.d/load_latest_dump.sh
2025-12-13 19:13:46 db-1         | * Found db export /db-exports/meta2onto_latest.dump
2025-12-13 19:13:46 db-1         | * Dropping and recreating database meta2onto...
2025-12-13 19:13:46 db-1         | 2025-12-14 00:13:46.223 UTC [70] LOG:  checkpoint starting: immediate force wait
2025-12-13 19:13:46 db-1         | 2025-12-14 00:13:46.229 UTC [70] LOG:  checkpoint complete: wrote 4 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.006 s; sync files=3, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB; lsn=0/1915DA0, redo lsn=0/1915D48
2025-12-13 19:13:46 db-1         | * Restoring database from dump /db-exports/meta2onto_latest.dump...
2025-12-13 19:13:51 db-1         | 2025-12-14 00:13:51.267 UTC [70] LOG:  checkpoints are occurring too frequently (5 seconds apart)
2025-12-13 19:13:51 db-1         | 2025-12-14 00:13:51.267 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:13:51 db-1         | 2025-12-14 00:13:51.281 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:13:57 db-1         | 2025-12-14 00:13:57.546 UTC [70] LOG:  checkpoint complete: wrote 11527 buffers (70.4%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.937 s, sync=0.275 s, total=6.279 s; sync files=384, longest=0.197 s, average=0.001 s; distance=535483 kB, estimate=535483 kB; lsn=0/40D367B8, redo lsn=0/22404D08
2025-12-13 19:13:58 db-1         | 2025-12-14 00:13:58.061 UTC [70] LOG:  checkpoints are occurring too frequently (7 seconds apart)
2025-12-13 19:13:58 db-1         | 2025-12-14 00:13:58.061 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:13:58 db-1         | 2025-12-14 00:13:58.061 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:05 db-1         | 2025-12-14 00:14:05.222 UTC [70] LOG:  checkpoint complete: wrote 2225 buffers (13.6%); 0 WAL file(s) added, 0 removed, 33 recycled; write=6.957 s, sync=0.154 s, total=7.162 s; sync files=11, longest=0.150 s, average=0.014 s; distance=540673 kB, estimate=540673 kB; lsn=0/61C49108, redo lsn=0/43405178
2025-12-13 19:14:05 db-1         | 2025-12-14 00:14:05.898 UTC [70] LOG:  checkpoints are occurring too frequently (7 seconds apart)
2025-12-13 19:14:05 db-1         | 2025-12-14 00:14:05.898 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:05 db-1         | 2025-12-14 00:14:05.898 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:11 db-1         | 2025-12-14 00:14:11.745 UTC [70] LOG:  checkpoint complete: wrote 2084 buffers (12.7%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.576 s, sync=0.233 s, total=5.847 s; sync files=8, longest=0.230 s, average=0.030 s; distance=539347 kB, estimate=540540 kB; lsn=0/82C38738, redo lsn=0/642B9EF8
2025-12-13 19:14:12 db-1         | 2025-12-14 00:14:12.173 UTC [70] LOG:  checkpoints are occurring too frequently (7 seconds apart)
2025-12-13 19:14:12 db-1         | 2025-12-14 00:14:12.173 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:12 db-1         | 2025-12-14 00:14:12.173 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:18 db-1         | 2025-12-14 00:14:18.221 UTC [70] LOG:  checkpoint complete: wrote 27 buffers (0.2%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.729 s, sync=0.266 s, total=6.048 s; sync files=3, longest=0.171 s, average=0.089 s; distance=542006 kB, estimate=542006 kB; lsn=0/A3E705D0, redo lsn=0/854078B8
2025-12-13 19:14:18 db-1         | 2025-12-14 00:14:18.583 UTC [70] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:14:18 db-1         | 2025-12-14 00:14:18.583 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:18 db-1         | 2025-12-14 00:14:18.584 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:24 db-1         | 2025-12-14 00:14:24.603 UTC [70] LOG:  checkpoint complete: wrote 29 buffers (0.2%); 0 WAL file(s) added, 1 removed, 32 recycled; write=5.688 s, sync=0.260 s, total=6.020 s; sync files=8, longest=0.209 s, average=0.033 s; distance=538043 kB, estimate=541610 kB; lsn=0/C5404F68, redo lsn=0/A61764C0
2025-12-13 19:14:24 db-1         | 2025-12-14 00:14:24.736 UTC [70] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:14:24 db-1         | 2025-12-14 00:14:24.736 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:24 db-1         | 2025-12-14 00:14:24.736 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:28 db-1         | 2025-12-14 00:14:28.893 UTC [70] LOG:  checkpoint complete: wrote 1358 buffers (8.3%); 0 WAL file(s) added, 0 removed, 33 recycled; write=3.852 s, sync=0.240 s, total=4.157 s; sync files=20, longest=0.189 s, average=0.012 s; distance=541588 kB, estimate=541607 kB; lsn=0/E540E2B8, redo lsn=0/C725B5B0
2025-12-13 19:14:29 db-1         | 2025-12-14 00:14:29.880 UTC [106] ERROR:  canceling autovacuum task
2025-12-13 19:14:29 db-1         | 2025-12-14 00:14:29.880 UTC [106] CONTEXT:  while scanning block 9961 of relation "public.api_geoseriesmetadata"
2025-12-13 19:14:29 db-1         | automatic vacuum of table "meta2onto.public.api_geoseriesmetadata"
2025-12-13 19:14:31 db-1         | 2025-12-14 00:14:31.113 UTC [106] LOG:  skipping analyze of "api_ontologysynonyms" --- lock not available
2025-12-13 19:14:31 db-1         | 2025-12-14 00:14:31.278 UTC [106] LOG:  skipping analyze of "api_ontologyterms" --- lock not available
2025-12-13 19:14:32 db-1         | 2025-12-14 00:14:32.402 UTC [106] ERROR:  canceling autovacuum task
2025-12-13 19:14:32 db-1         | 2025-12-14 00:14:32.402 UTC [106] CONTEXT:  while scanning block 2613 of relation "public.api_organismforpairing"
2025-12-13 19:14:32 db-1         | automatic vacuum of table "meta2onto.public.api_organismforpairing"
2025-12-13 19:14:33 db-1         | 2025-12-14 00:14:33.850 UTC [70] LOG:  checkpoints are occurring too frequently (9 seconds apart)
2025-12-13 19:14:33 db-1         | 2025-12-14 00:14:33.850 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:33 db-1         | 2025-12-14 00:14:33.850 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:52 db-1         | 2025-12-14 00:14:52.473 UTC [70] LOG:  checkpoint complete: wrote 5424 buffers (33.1%); 0 WAL file(s) added, 2 removed, 31 recycled; write=18.327 s, sync=0.244 s, total=18.623 s; sync files=94, longest=0.187 s, average=0.003 s; distance=542474 kB, estimate=542474 kB; lsn=1/817D900, redo lsn=0/E841DF40
2025-12-13 19:14:52 db-1         | 2025-12-14 00:14:52.535 UTC [70] LOG:  checkpoints are occurring too frequently (19 seconds apart)
2025-12-13 19:14:52 db-1         | 2025-12-14 00:14:52.535 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:14:52 db-1         | 2025-12-14 00:14:52.535 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:14:53 db-1         | 2025-12-14 00:14:53.779 UTC [106] ERROR:  canceling autovacuum task
2025-12-13 19:14:53 db-1         | 2025-12-14 00:14:53.779 UTC [106] CONTEXT:  while scanning block 49777 of relation "public.api_sample"
2025-12-13 19:14:53 db-1         | automatic vacuum of table "meta2onto.public.api_sample"
2025-12-13 19:15:08 db-1         | 2025-12-14 00:15:08.647 UTC [106] ERROR:  canceling autovacuum task
2025-12-13 19:15:08 db-1         | 2025-12-14 00:15:08.647 UTC [106] CONTEXT:  while scanning block 20719 of relation "public.api_searchterm"
2025-12-13 19:15:08 db-1         | automatic vacuum of table "meta2onto.public.api_searchterm"
2025-12-13 19:15:14 db-1         | 2025-12-14 00:15:14.854 UTC [70] LOG:  checkpoint complete: wrote 25 buffers (0.2%); 0 WAL file(s) added, 1 removed, 32 recycled; write=22.140 s, sync=0.126 s, total=22.319 s; sync files=36, longest=0.091 s, average=0.004 s; distance=540593 kB, estimate=542286 kB; lsn=1/28411FA0, redo lsn=1/940A670
2025-12-13 19:15:14 db-1         | 2025-12-14 00:15:14.909 UTC [70] LOG:  checkpoints are occurring too frequently (22 seconds apart)
2025-12-13 19:15:14 db-1         | 2025-12-14 00:15:14.909 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:15:14 db-1         | 2025-12-14 00:15:14.910 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:15:16 db-1         | 2025-12-14 00:15:16.807 UTC [106] ERROR:  canceling autovacuum task
2025-12-13 19:15:16 db-1         | 2025-12-14 00:15:16.807 UTC [106] CONTEXT:  while scanning block 9609 of relation "public.api_series"
2025-12-13 19:15:16 db-1         | automatic vacuum of table "meta2onto.public.api_series"
2025-12-13 19:15:24 db-1         | 2025-12-14 00:15:24.873 UTC [70] LOG:  checkpoint complete: wrote 79 buffers (0.5%); 0 WAL file(s) added, 1 removed, 32 recycled; write=9.763 s, sync=0.157 s, total=9.964 s; sync files=48, longest=0.101 s, average=0.004 s; distance=540834 kB, estimate=542141 kB; lsn=1/4943C238, redo lsn=1/2A433040
2025-12-13 19:15:24 db-1         | 2025-12-14 00:15:24.916 UTC [70] LOG:  checkpoints are occurring too frequently (10 seconds apart)
2025-12-13 19:15:24 db-1         | 2025-12-14 00:15:24.916 UTC [70] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:15:24 db-1         | 2025-12-14 00:15:24.916 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:15:32 db-1         | 2025-12-14 00:15:32.095 UTC [122] ERROR:  canceling autovacuum task
2025-12-13 19:15:32 db-1         | 2025-12-14 00:15:32.095 UTC [122] CONTEXT:  while scanning block 50065 of relation "public.api_organismforpairing"
2025-12-13 19:15:32 db-1         | automatic vacuum of table "meta2onto.public.api_organismforpairing"
2025-12-13 19:15:46 db-1         | 2025-12-14 00:15:46.112 UTC [160] LOG:  skipping vacuum of "api_organismforpairing" --- lock not available
2025-12-13 19:15:54 db-1         | 2025-12-14 00:15:54.349 UTC [70] LOG:  checkpoint complete: wrote 7776 buffers (47.5%); 0 WAL file(s) added, 0 removed, 33 recycled; write=29.252 s, sync=0.137 s, total=29.433 s; sync files=88, longest=0.067 s, average=0.002 s; distance=540600 kB, estimate=541987 kB; lsn=1/69BC23B8, redo lsn=1/4B421238
2025-12-13 19:15:54 db-1         | 2025-12-14 00:15:54.674 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:16:23 db-1         | 2025-12-14 00:16:23.687 UTC [70] LOG:  checkpoint complete: wrote 4460 buffers (27.2%); 0 WAL file(s) added, 1 removed, 32 recycled; write=28.793 s, sync=0.174 s, total=29.013 s; sync files=62, longest=0.130 s, average=0.003 s; distance=540602 kB, estimate=541848 kB; lsn=1/8B4258C0, redo lsn=1/6C40FA68
2025-12-13 19:16:25 db-1         | 2025-12-14 00:16:25.563 UTC [70] LOG:  checkpoint starting: wal
2025-12-13 19:16:38 db-1         | 
2025-12-13 19:16:38 db-1         | PostgreSQL Database directory appears to contain a database; Skipping initialization, proceeding to post-init...
2025-12-13 19:16:38 db-1         | 
2025-12-13 19:16:38 db-1         | pg_ctl: another server might be running; trying to start server anyway
2025-12-13 19:16:38 db-1         | waiting for server to start....2025-12-14 00:16:38.311 UTC [32] LOG:  starting PostgreSQL 17.7 (Debian 17.7-3.pgdg13+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-12-13 19:16:38 db-1         | 2025-12-14 00:16:38.312 UTC [32] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-12-13 19:16:38 db-1         | 2025-12-14 00:16:38.315 UTC [35] LOG:  database system was interrupted; last known up at 2025-12-14 00:16:23 UTC
2025-12-13 19:16:38 db-1         | 2025-12-14 00:16:38.396 UTC [35] LOG:  database system was not properly shut down; automatic recovery in progress
2025-12-13 19:16:38 db-1         | 2025-12-14 00:16:38.398 UTC [35] LOG:  redo starts at 1/6C40FA68
2025-12-13 19:16:39 db-1         | .2025-12-14 00:16:39.590 UTC [35] LOG:  invalid record length at 1/9305FEF8: expected at least 24, got 0
2025-12-13 19:16:39 db-1         | 2025-12-14 00:16:39.590 UTC [35] LOG:  redo done at 1/9305FEB8 system usage: CPU: user: 0.43 s, system: 0.68 s, elapsed: 1.19 s
2025-12-13 19:16:39 db-1         | 2025-12-14 00:16:39.596 UTC [33] LOG:  checkpoint starting: end-of-recovery immediate wait
2025-12-13 19:16:40 db-1         | 2025-12-14 00:16:40.204 UTC [33] LOG:  checkpoint complete: wrote 16380 buffers (100.0%); 0 WAL file(s) added, 0 removed, 39 recycled; write=0.085 s, sync=0.501 s, total=0.609 s; sync files=56, longest=0.161 s, average=0.009 s; distance=635201 kB, estimate=635201 kB; lsn=1/9305FEF8, redo lsn=1/9305FEF8
2025-12-13 19:16:40 db-1         | 2025-12-14 00:16:40.207 UTC [32] LOG:  database system is ready to accept connections
2025-12-13 19:16:40 db-1         |  done
2025-12-13 19:16:40 db-1         | server started
2025-12-13 19:16:40 db-1         | 
2025-12-13 19:16:40 db-1         | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-postinit.d/load_latest_dump.sh
2025-12-13 19:16:40 db-1         | * Found db export /db-exports/meta2onto_latest.dump
2025-12-13 19:16:40 db-1         | * Dropping and recreating database meta2onto...
2025-12-13 19:16:40 db-1         | 2025-12-14 00:16:40.361 UTC [33] LOG:  checkpoint starting: immediate force wait
2025-12-13 19:16:40 db-1         | 2025-12-14 00:16:40.364 UTC [33] LOG:  checkpoint complete: wrote 1 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.004 s; sync files=1, longest=0.001 s, average=0.001 s; distance=1 kB, estimate=571681 kB; lsn=1/93060408, redo lsn=1/930603B0
2025-12-13 19:16:40 db-1         | * Restoring database from dump /db-exports/meta2onto_latest.dump...
2025-12-13 19:16:45 db-1         | 2025-12-14 00:16:45.641 UTC [33] LOG:  checkpoints are occurring too frequently (5 seconds apart)
2025-12-13 19:16:45 db-1         | 2025-12-14 00:16:45.641 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:16:45 db-1         | 2025-12-14 00:16:45.641 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:16:51 db-1         | 2025-12-14 00:16:51.226 UTC [33] LOG:  checkpoint complete: wrote 12072 buffers (73.7%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.440 s, sync=0.116 s, total=5.585 s; sync files=384, longest=0.066 s, average=0.001 s; distance=544420 kB, estimate=568955 kB; lsn=1/D2559F28, redo lsn=1/B4409690
2025-12-13 19:16:51 db-1         | 2025-12-14 00:16:51.819 UTC [33] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:16:51 db-1         | 2025-12-14 00:16:51.819 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:16:51 db-1         | 2025-12-14 00:16:51.819 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:16:58 db-1         | 2025-12-14 00:16:58.941 UTC [33] LOG:  checkpoint complete: wrote 185 buffers (1.1%); 0 WAL file(s) added, 0 removed, 33 recycled; write=6.974 s, sync=0.111 s, total=7.123 s; sync files=10, longest=0.107 s, average=0.012 s; distance=536640 kB, estimate=565723 kB; lsn=1/F30373B0, redo lsn=1/D50197A0
2025-12-13 19:16:59 db-1         | 2025-12-14 00:16:59.803 UTC [33] LOG:  checkpoints are occurring too frequently (8 seconds apart)
2025-12-13 19:16:59 db-1         | 2025-12-14 00:16:59.803 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:16:59 db-1         | 2025-12-14 00:16:59.803 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:17:05 db-1         | 2025-12-14 00:17:05.844 UTC [33] LOG:  checkpoint complete: wrote 2082 buffers (12.7%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.832 s, sync=0.175 s, total=6.042 s; sync files=8, longest=0.169 s, average=0.022 s; distance=544673 kB, estimate=563618 kB; lsn=2/14BCFEC8, redo lsn=1/F6401C20
2025-12-13 19:17:06 db-1         | 2025-12-14 00:17:06.280 UTC [33] LOG:  checkpoints are occurring too frequently (7 seconds apart)
2025-12-13 19:17:06 db-1         | 2025-12-14 00:17:06.280 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:17:06 db-1         | 2025-12-14 00:17:06.280 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:17:12 db-1         | 2025-12-14 00:17:12.210 UTC [33] LOG:  checkpoint complete: wrote 28 buffers (0.2%); 0 WAL file(s) added, 0 removed, 33 recycled; write=5.796 s, sync=0.097 s, total=5.930 s; sync files=3, longest=0.064 s, average=0.033 s; distance=540674 kB, estimate=561324 kB; lsn=2/3540C130, redo lsn=2/17402698
2025-12-13 19:17:12 db-1         | 2025-12-14 00:17:12.726 UTC [33] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:17:12 db-1         | 2025-12-14 00:17:12.726 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:17:12 db-1         | 2025-12-14 00:17:12.726 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:17:18 db-1         | 2025-12-14 00:17:18.597 UTC [33] LOG:  checkpoint complete: wrote 31 buffers (0.2%); 0 WAL file(s) added, 1 removed, 32 recycled; write=5.676 s, sync=0.146 s, total=5.872 s; sync files=8, longest=0.090 s, average=0.019 s; distance=540698 kB, estimate=559261 kB; lsn=2/574008A0, redo lsn=2/38408F78
2025-12-13 19:17:18 db-1         | 2025-12-14 00:17:18.735 UTC [33] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:17:18 db-1         | 2025-12-14 00:17:18.735 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:17:18 db-1         | 2025-12-14 00:17:18.735 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:17:23 db-1         | 2025-12-14 00:17:23.160 UTC [33] LOG:  checkpoint complete: wrote 1260 buffers (7.7%); 0 WAL file(s) added, 0 removed, 33 recycled; write=4.258 s, sync=0.113 s, total=4.425 s; sync files=29, longest=0.069 s, average=0.004 s; distance=539411 kB, estimate=557276 kB; lsn=2/77547E70, redo lsn=2/592CDBB8
2025-12-13 19:17:24 db-1         | 2025-12-14 00:17:24.444 UTC [33] LOG:  checkpoints are occurring too frequently (6 seconds apart)
2025-12-13 19:17:24 db-1         | 2025-12-14 00:17:24.444 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:17:24 db-1         | 2025-12-14 00:17:24.447 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:17:42 db-1         | 2025-12-14 00:17:42.845 UTC [33] LOG:  checkpoint complete: wrote 7467 buffers (45.6%); 0 WAL file(s) added, 1 removed, 32 recycled; write=18.225 s, sync=0.140 s, total=18.401 s; sync files=66, longest=0.121 s, average=0.003 s; distance=541943 kB, estimate=555743 kB; lsn=2/9949C310, redo lsn=2/7A40B8F8
2025-12-13 19:17:42 db-1         | 2025-12-14 00:17:42.996 UTC [33] LOG:  checkpoints are occurring too frequently (18 seconds apart)
2025-12-13 19:17:42 db-1         | 2025-12-14 00:17:42.996 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:17:42 db-1         | 2025-12-14 00:17:42.996 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:18:02 db-1         | 2025-12-14 00:18:02.375 UTC [33] LOG:  checkpoint complete: wrote 23 buffers (0.1%); 0 WAL file(s) added, 1 removed, 32 recycled; write=19.221 s, sync=0.101 s, total=19.379 s; sync files=39, longest=0.088 s, average=0.003 s; distance=540682 kB, estimate=554237 kB; lsn=2/BA3FF648, redo lsn=2/9B40E3F8
2025-12-13 19:18:02 db-1         | 2025-12-14 00:18:02.444 UTC [33] LOG:  checkpoints are occurring too frequently (20 seconds apart)
2025-12-13 19:18:02 db-1         | 2025-12-14 00:18:02.444 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:18:02 db-1         | 2025-12-14 00:18:02.444 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:18:11 db-1         | 2025-12-14 00:18:11.148 UTC [33] LOG:  checkpoint complete: wrote 1830 buffers (11.2%); 0 WAL file(s) added, 1 removed, 32 recycled; write=8.529 s, sync=0.117 s, total=8.704 s; sync files=60, longest=0.078 s, average=0.002 s; distance=540746 kB, estimate=552888 kB; lsn=2/DB572E68, redo lsn=2/BC420CE8
2025-12-13 19:18:11 db-1         | 2025-12-14 00:18:11.181 UTC [33] LOG:  checkpoints are occurring too frequently (9 seconds apart)
2025-12-13 19:18:11 db-1         | 2025-12-14 00:18:11.181 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:18:11 db-1         | 2025-12-14 00:18:11.181 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:18:18 db-1         | 2025-12-14 00:18:18.364 UTC [84] ERROR:  canceling autovacuum task
2025-12-13 19:18:18 db-1         | 2025-12-14 00:18:18.364 UTC [84] CONTEXT:  while scanning block 45457 of relation "public.api_organismforpairing"
2025-12-13 19:18:18 db-1         | automatic vacuum of table "meta2onto.public.api_organismforpairing"
2025-12-13 19:18:40 db-1         | 2025-12-14 00:18:40.846 UTC [33] LOG:  checkpoint complete: wrote 5476 buffers (33.4%); 0 WAL file(s) added, 0 removed, 33 recycled; write=29.460 s, sync=0.133 s, total=29.666 s; sync files=78, longest=0.056 s, average=0.002 s; distance=540758 kB, estimate=551675 kB; lsn=2/FBB42970, redo lsn=2/DD4365A8
2025-12-13 19:18:41 db-1         | 2025-12-14 00:18:41.155 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:19:10 db-1         | 2025-12-14 00:19:10.278 UTC [33] LOG:  checkpoint complete: wrote 4422 buffers (27.0%); 0 WAL file(s) added, 0 removed, 33 recycled; write=28.825 s, sync=0.211 s, total=29.124 s; sync files=46, longest=0.152 s, average=0.005 s; distance=540471 kB, estimate=550554 kB; lsn=3/1CF98B40, redo lsn=2/FE4042C8
2025-12-13 19:19:10 db-1         | 2025-12-14 00:19:10.535 UTC [131] LOG:  skipping vacuum of "api_organismforpairing" --- lock not available
2025-12-13 19:19:12 db-1         | 2025-12-14 00:19:12.166 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:19:40 db-1         | 2025-12-14 00:19:40.792 UTC [33] LOG:  checkpoint complete: wrote 29 buffers (0.2%); 0 WAL file(s) added, 0 removed, 33 recycled; write=28.424 s, sync=0.123 s, total=28.627 s; sync files=31, longest=0.059 s, average=0.004 s; distance=540767 kB, estimate=549575 kB; lsn=3/3D8DCF18, redo lsn=3/1F41C130
2025-12-13 19:19:40 db-1         | 2025-12-14 00:19:40.913 UTC [33] LOG:  checkpoints are occurring too frequently (28 seconds apart)
2025-12-13 19:19:40 db-1         | 2025-12-14 00:19:40.913 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:19:40 db-1         | 2025-12-14 00:19:40.913 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:19:58 db-1         | 2025-12-14 00:19:58.562 UTC [84] ERROR:  canceling autovacuum task
2025-12-13 19:19:58 db-1         | 2025-12-14 00:19:58.562 UTC [84] CONTEXT:  while scanning block 119887 of relation "public.api_searchterm"
2025-12-13 19:19:58 db-1         | automatic vacuum of table "meta2onto.public.api_searchterm"
2025-12-13 19:20:05 db-1         | 2025-12-14 00:20:05.169 UTC [33] LOG:  checkpoint complete: wrote 35 buffers (0.2%); 0 WAL file(s) added, 0 removed, 33 recycled; write=24.168 s, sync=0.038 s, total=24.257 s; sync files=42, longest=0.028 s, average=0.001 s; distance=540648 kB, estimate=548683 kB; lsn=3/5E88BAD0, redo lsn=3/40416308
2025-12-13 19:20:05 db-1         | 2025-12-14 00:20:05.549 UTC [33] LOG:  checkpoints are occurring too frequently (25 seconds apart)
2025-12-13 19:20:05 db-1         | 2025-12-14 00:20:05.549 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:20:05 db-1         | 2025-12-14 00:20:05.549 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:20:34 db-1         | 2025-12-14 00:20:34.687 UTC [160] LOG:  skipping vacuum of "api_searchterm" --- lock not available
2025-12-13 19:21:02 db-1         | 2025-12-14 00:21:02.613 UTC [33] LOG:  checkpoint complete: wrote 3012 buffers (18.4%); 0 WAL file(s) added, 1 removed, 32 recycled; write=56.893 s, sync=0.107 s, total=57.065 s; sync files=51, longest=0.042 s, average=0.003 s; distance=537147 kB, estimate=547529 kB; lsn=3/803A41F8, redo lsn=3/610A5218
2025-12-13 19:21:02 db-1         | 2025-12-14 00:21:02.826 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:21:07 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:07 backend-1    |     self.connect()
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:07 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:07 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:07 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:07 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:07 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:07 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:07 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:07 backend-1    | 
2025-12-13 19:21:07 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:21:07 backend-1    | 
2025-12-13 19:21:07 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:07 backend-1    |   File "/app/src/./manage.py", line 22, in <module>
2025-12-13 19:21:07 backend-1    |     main()
2025-12-13 19:21:07 backend-1    |   File "/app/src/./manage.py", line 18, in main
2025-12-13 19:21:07 backend-1    |     execute_from_command_line(sys.argv)
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2025-12-13 19:21:07 backend-1    |     utility.execute()
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
2025-12-13 19:21:07 backend-1    |     self.fetch_command(subcommand).run_from_argv(self.argv)
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
2025-12-13 19:21:07 backend-1    |     self.execute(*args, **cmd_options)
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 460, in execute
2025-12-13 19:21:07 backend-1    |     output = self.handle(*args, **options)
2025-12-13 19:21:07 backend-1    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 107, in wrapper
2025-12-13 19:21:07 backend-1    |     res = handle_func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 114, in handle
2025-12-13 19:21:07 backend-1    |     executor = MigrationExecutor(connection, self.migration_progress_callback)
2025-12-13 19:21:07 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:21:07 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:21:07 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:21:07 backend-1    |     self.build_graph()
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:21:07 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:21:07 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:21:07 backend-1    |     if self.has_table():
2025-12-13 19:21:07 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:21:07 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:21:07 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:21:07 backend-1    |     return self._cursor()
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:21:07 backend-1    |     self.ensure_connection()
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:21:07 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:21:07 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:21:07 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:07 backend-1    |     self.connect()
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:07 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:07 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:07 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:07 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:07 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:07 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:07 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:07 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:07 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:07 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:07 backend-1    | * Creating superuser account if it doesn't exist
2025-12-13 19:21:08 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:08 backend-1    |     self.connect()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:08 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:08 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:08 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:08 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:08 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:08 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:08 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:08 backend-1    | 
2025-12-13 19:21:08 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:21:08 backend-1    | 
2025-12-13 19:21:08 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:08 backend-1    |   File "/app/src/./manage.py", line 22, in <module>
2025-12-13 19:21:08 backend-1    |     main()
2025-12-13 19:21:08 backend-1    |   File "/app/src/./manage.py", line 18, in main
2025-12-13 19:21:08 backend-1    |     execute_from_command_line(sys.argv)
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
2025-12-13 19:21:08 backend-1    |     utility.execute()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
2025-12-13 19:21:08 backend-1    |     self.fetch_command(subcommand).run_from_argv(self.argv)
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 416, in run_from_argv
2025-12-13 19:21:08 backend-1    |     self.execute(*args, **cmd_options)
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 90, in execute
2025-12-13 19:21:08 backend-1    |     return super().execute(*args, **options)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
2025-12-13 19:21:08 backend-1    |     self.check_migrations()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 587, in check_migrations
2025-12-13 19:21:08 backend-1    |     executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
2025-12-13 19:21:08 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:21:08 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:21:08 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:21:08 backend-1    |     self.build_graph()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:21:08 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:21:08 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:21:08 backend-1    |     if self.has_table():
2025-12-13 19:21:08 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:21:08 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:21:08 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:21:08 backend-1    |     return self._cursor()
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:21:08 backend-1    |     self.ensure_connection()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:21:08 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:21:08 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:21:08 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:08 backend-1    |     self.connect()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:08 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:08 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:08 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:08 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:08 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:08 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:08 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:08 backend-1    | * Collecting static files
2025-12-13 19:21:08 backend-1    | 
2025-12-13 19:21:08 backend-1    | 0 static files copied to '/opt/static', 163 unmodified.
2025-12-13 19:21:08 backend-1    | * Serving via django runserver (debug mode)
2025-12-13 19:21:08 backend-1    | Watching for file changes with StatReloader
2025-12-13 19:21:08 backend-1    | Exception in thread django-main-thread:
2025-12-13 19:21:08 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:08 backend-1    |     self.connect()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:08 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:08 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:08 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:08 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:08 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:08 backend-1    | psycopg.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:08 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:08 backend-1    | 
2025-12-13 19:21:08 backend-1    | The above exception was the direct cause of the following exception:
2025-12-13 19:21:08 backend-1    | 
2025-12-13 19:21:08 backend-1    | Traceback (most recent call last):
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
2025-12-13 19:21:08 backend-1    |     self.run()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/threading.py", line 1012, in run
2025-12-13 19:21:08 backend-1    |     self._target(*self._args, **self._kwargs)
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper
2025-12-13 19:21:08 backend-1    |     fn(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 137, in inner_run
2025-12-13 19:21:08 backend-1    |     self.check_migrations()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 587, in check_migrations
2025-12-13 19:21:08 backend-1    |     executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
2025-12-13 19:21:08 backend-1    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/executor.py", line 18, in __init__
2025-12-13 19:21:08 backend-1    |     self.loader = MigrationLoader(self.connection)
2025-12-13 19:21:08 backend-1    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 58, in __init__
2025-12-13 19:21:08 backend-1    |     self.build_graph()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/loader.py", line 235, in build_graph
2025-12-13 19:21:08 backend-1    |     self.applied_migrations = recorder.applied_migrations()
2025-12-13 19:21:08 backend-1    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 89, in applied_migrations
2025-12-13 19:21:08 backend-1    |     if self.has_table():
2025-12-13 19:21:08 backend-1    |        ^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/migrations/recorder.py", line 63, in has_table
2025-12-13 19:21:08 backend-1    |     with self.connection.cursor() as cursor:
2025-12-13 19:21:08 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 320, in cursor
2025-12-13 19:21:08 backend-1    |     return self._cursor()
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 296, in _cursor
2025-12-13 19:21:08 backend-1    |     self.ensure_connection()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 278, in ensure_connection
2025-12-13 19:21:08 backend-1    |     with self.wrap_database_errors:
2025-12-13 19:21:08 backend-1    |          ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
2025-12-13 19:21:08 backend-1    |     raise dj_exc_value.with_traceback(traceback) from exc_value
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 279, in ensure_connection
2025-12-13 19:21:08 backend-1    |     self.connect()
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/base/base.py", line 256, in connect
2025-12-13 19:21:08 backend-1    |     self.connection = self.get_new_connection(conn_params)
2025-12-13 19:21:08 backend-1    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/utils/asyncio.py", line 26, in inner
2025-12-13 19:21:08 backend-1    |     return func(*args, **kwargs)
2025-12-13 19:21:08 backend-1    |            ^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/django/db/backends/postgresql/base.py", line 332, in get_new_connection
2025-12-13 19:21:08 backend-1    |     connection = self.Database.connect(**conn_params)
2025-12-13 19:21:08 backend-1    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-13 19:21:08 backend-1    |   File "/usr/local/lib/python3.12/site-packages/psycopg/connection.py", line 120, in connect
2025-12-13 19:21:08 backend-1    |     raise last_ex.with_traceback(None)
2025-12-13 19:21:08 backend-1    | django.db.utils.OperationalError: connection failed: connection to server at "172.19.0.3", port 5432 failed: Connection refused
2025-12-13 19:21:08 backend-1    | Is the server running on that host and accepting TCP/IP connections?
2025-12-13 19:21:10 db-1         | 2025-12-14 00:21:10.644 UTC [194] LOG:  skipping vacuum of "api_searchterm" --- lock not available
2025-12-13 19:21:26 db-1         | 2025-12-14 00:21:26.613 UTC [33] LOG:  checkpoint complete: wrote 2356 buffers (14.4%); 0 WAL file(s) added, 3 removed, 30 recycled; write=23.114 s, sync=0.602 s, total=23.787 s; sync files=42, longest=0.446 s, average=0.015 s; distance=544312 kB, estimate=547207 kB; lsn=3/A3414930, redo lsn=3/824334D8
2025-12-13 19:21:26 db-1         | 2025-12-14 00:21:26.613 UTC [33] LOG:  checkpoints are occurring too frequently (24 seconds apart)
2025-12-13 19:21:26 db-1         | 2025-12-14 00:21:26.613 UTC [33] HINT:  Consider increasing the configuration parameter "max_wal_size".
2025-12-13 19:21:26 db-1         | 2025-12-14 00:21:26.613 UTC [33] LOG:  checkpoint starting: wal
2025-12-13 19:21:43 db-1         | * Restored db export /db-exports/meta2onto_latest.dump
2025-12-13 19:21:43 db-1         | 
2025-12-13 19:21:43 db-1         | real5m2.387s
2025-12-13 19:21:43 db-1         | user0m11.536s
2025-12-13 19:21:43 db-1         | sys0m1.080s
2025-12-13 19:21:43 db-1         | 
2025-12-13 19:21:43 db-1         | waiting for server to shut down....2025-12-14 00:21:43.385 UTC [32] LOG:  received fast shutdown request
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.387 UTC [32] LOG:  aborting any active transactions
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.388 UTC [32] LOG:  background worker "logical replication launcher" (PID 38) exited with exit code 1
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.492 UTC [33] LOG:  checkpoint complete: wrote 74 buffers (0.5%); 0 WAL file(s) added, 0 removed, 33 recycled; write=16.772 s, sync=0.064 s, total=16.879 s; sync files=28, longest=0.050 s, average=0.003 s; distance=552296 kB, estimate=552296 kB; lsn=3/A3FBD0B0, redo lsn=3/A3F8D750
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.492 UTC [33] LOG:  shutting down
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.493 UTC [33] LOG:  checkpoint starting: shutdown immediate
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.502 UTC [33] LOG:  checkpoint complete: wrote 37 buffers (0.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.003 s, total=0.011 s; sync files=22, longest=0.002 s, average=0.001 s; distance=190 kB, estimate=497086 kB; lsn=3/A3FBD128, redo lsn=3/A3FBD128
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.511 UTC [32] LOG:  database system is shut down
2025-12-13 19:21:43 db-1         |  done
2025-12-13 19:21:43 db-1         | server stopped
2025-12-13 19:21:43 db-1         | 
2025-12-13 19:21:43 db-1         | PostgreSQL post-init process complete; ready for start up.
2025-12-13 19:21:43 db-1         | 
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.603 UTC [1] LOG:  starting PostgreSQL 17.7 (Debian 17.7-3.pgdg13+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.603 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.604 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.607 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.610 UTC [213] LOG:  database system was shut down at 2025-12-14 00:21:43 UTC
2025-12-13 19:21:43 db-1         | 2025-12-14 00:21:43.614 UTC [1] LOG:  database system is ready to accept connections

Since I'll be out until next year, I'd say you can just get this to your desired level of stability/completion, merge it, and continue with more features in a new PR.

Here were the near-term todo items items I had for myself, but they don't seem appropriate to do in this PR anymore:

Screenshot 2025-12-13 at 8 22 55 PM

Aside from these, I made some minor edits to the frontend files in regards to code and type organization, and type fixes.

@falquaddoomi
Copy link
Collaborator Author

falquaddoomi commented Dec 17, 2025

Hey @vincerubinetti, thanks for the response. So, those errors look like the backend is attempting to access the database, but it's failing because the db isn't ready to receive connections yet. In this PR I made some service dependency changes in the Compose file to make the backend wait until the database is healthy (e.g., it's ready to accept connections), but I'm assuming they didn't trigger Compose to recreate the containers, thus they weren't applied. (FWIW, I assume this would only happen if you were coming from main and had containers already running, so it should be a niche edge case going forward.)

When you're back and if you're up to it, you can try bringing the stack down completely, including purging the database volume, and then bringing it back up to see if it correctly waits for the db before starting the backend:

# removes all services, purges containers
./run_stack.sh down -v
# recreates services, after which hopefully they'll use the current healthchecks
./run_stack.sh

If it's working, you should see two lines in the following order, indicating the backend waited until the database was ready:

db-1  | 2025-12-17 18:12:26.828 UTC [1] LOG:  database system is ready to accept connections
backend-1  | * Applying database migrations

Thanks for the summary of the todos as well, appreciated. Happy holidays!

@vincerubinetti
Copy link
Collaborator

I thought I had done a complete teardown via my brute force method of doing a factory reset through Docker compose (which I do periodically to save drive space, and which supposedly clears all images/vols/etc). But I must not have because it is working without error now, after waiting a bit extra for all the services to spin up.

I tested out what you have so far and also made some more modifications to the frontend. It looks good. Not sure how far you want to go with this PR vs. a new PR.

One of the first things that would be helpful is to get the open API spec hooked up to the frontend so I don't have to manually type out schemas. Also at the moment it seems like the field names could use some normalization/consistency, e.g. dates always being in a form like XXXed_at, always using name vs title, always using id vs gse or whatever.

@falquaddoomi
Copy link
Collaborator Author

falquaddoomi commented Jan 5, 2026

One of the first things that would be helpful is to get the open API spec hooked up to the frontend so I don't have to manually type out schemas.

Sounds good; I'm planning to use drf-spectacular to generate a client, the results of which will be placed somewhere in the frontend's source tree, like under frontend/src/api. I'd like to do that in a separate PR from this one.

Also at the moment it seems like the field names could use some normalization/consistency, e.g. dates always being in a form like XXXed_at, always using name vs title, always using id vs gse or whatever.

At the moment the column names are taken from the sources they come from to minimize confusion about how they map back to their source files, but I think it's a good idea to normalize them. As with the API client generation change, I think this should come in a new PR, probably after that one.

@falquaddoomi falquaddoomi merged commit 30f968b into main Jan 5, 2026
@falquaddoomi falquaddoomi deleted the api-integration branch January 5, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants