Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Erro ao rodar docker-compose up

Após o build (que foi terminado com sucesso), encontro o seguinte erro ao tentar dar o up:

WARN[0000] Ignoring: volume: Bind: [CreateHostPath]     
INFO[0000] Ensuring image restaurantesapi_web           
INFO[0000] Creating container restaurantesapi_web_1     
INFO[0000] Attaching to logs                            
web_1 |/usr/local/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py:105: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': unable to open database file
web_1 |  warnings.warn(
web_1 |No changes detected
web_1 |Traceback (most recent call last):
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
web_1 |    self.connect()
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
web_1 |    return func(*args, **kwargs)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 200, in connect
web_1 |    self.connection = self.get_new_connection(conn_params)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
web_1 |    return func(*args, **kwargs)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 209, in get_new_connection
web_1 |    conn = Database.connect(**conn_params)
web_1 |sqlite3.OperationalError: unable to open database file
web_1 |
web_1 |The above exception was the direct cause of the following exception:
web_1 |
web_1 |Traceback (most recent call last):
web_1 |  File "/app/manage.py", line 22, in <module>
web_1 |    main()
web_1 |  File "/app/manage.py", line 18, in main
web_1 |    execute_from_command_line(sys.argv)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
web_1 |    utility.execute()
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
web_1 |    self.fetch_command(subcommand).run_from_argv(self.argv)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
web_1 |    self.execute(*args, **cmd_options)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
web_1 |    output = self.handle(*args, **options)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 89, in wrapped
web_1 |    res = handle_func(*args, **kwargs)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 92, in handle
web_1 |    executor = MigrationExecutor(connection, self.migration_progress_callback)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/executor.py", line 18, in __init__
web_1 |    self.loader = MigrationLoader(self.connection)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 53, in __init__
web_1 |    self.build_graph()
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/loader.py", line 220, in build_graph
web_1 |    self.applied_migrations = recorder.applied_migrations()
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
web_1 |    if self.has_table():
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/migrations/recorder.py", line 55, in has_table
web_1 |    with self.connection.cursor() as cursor:
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
web_1 |    return func(*args, **kwargs)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/backends/base/base.py", line 259, in cursor
**[...] - reduzindo o log pra caber aqui**
web_1 |    self.connection = self.get_new_connection(conn_params)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
web_1 |    return func(*args, **kwargs)
web_1 |  File "/usr/local/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 209, in get_new_connection
web_1 |    conn = Database.connect(**conn_params)
web_1 |django.db.utils.OperationalError: unable to open database file
1 resposta
solução!

Consegui corrigir. O diretório home do meu usuário na máquina virtual estava como somente-leitura.