Skip to content

"make docker_makemigrations" not working. #618

@LuizDMM

Description

@LuizDMM

Describe the bug
I just created a project, created the .env and local.py files, ran when I run the command make docker_makemigrations it simply don't work. I'm getting a permission denied:

Migrations for 'users':
  users/migrations/0001_initial.py
    - Create model User
Traceback (most recent call last):
  File "/home/user/app/backend/manage.py", line 31, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 259, in handle
    self.write_migration_files(changes)
  File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py", line 363, in write_migration_files
    with open(writer.path, "w", encoding="utf-8") as fh:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/user/app/backend/users/migrations/0001_initial.py'
make: *** [Makefile:43: docker_makemigrations] Erro 1

To Reproduce

  1. Run django-admin startproject theprojectname --extension py,yml,json --name Procfile,Dockerfile,docker-compose.yml,README.md,.env.example,.gitignore,Makefile,render.yaml --template=https://github.com/vintasoftware/django-react-boilerplate/archive/boilerplate-release.zip
  2. Run cd theprojectname/backend/
  3. Run cp theprojectname/settings/local.py.example theprojectname/settings/local.py
  4. Run cp .env.example .env
  5. Uncomment the Postgres line on .env
  6. Run cd ..
  7. Run make docker_setup
  8. Run make docker_makemigrations

Desktop (please complete the following information):

  • OS: Debian 12

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions