-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"make docker_makemigrations" not working. #618
Comments
I followed the steps but could not reproduce the error: https://asciinema.org/a/nVbubarq02As0JdiO2Ghmya6u Not sure what could be causing the permission error. |
Update: Somehow I fixed this running |
It seems that your |
Maybe there's something with my virtual env. I use pyenv to manage my virtual envs. I will recreate the project changing the ownership of the files then. Thank you very much Vitor. |
Hello, and thank you for initiating this discussion. @rangelfinal @LuizDMM I'm encountering a similar issue where Docker containers, by default, create files under the root user (uid=0) on Linux. To address this, I attempted to pass my user ID and group ID to Docker during the image and container build process. Specifically, I set the user ID and group ID in the docker-compose.yaml (user: 1000:1000), and also tried passing UID and GID directly to the docker-compose command. Despite these efforts, I was unable to run makemigrations successfully without resorting to sudo. This is puzzling and quite time-consuming, and I'm still trying to resolve it. For now, my temporary workaround has been to use sudo for makemigrations or "chmod 777 -R backend/users/migrations", although I'm aware this isn't ideal. I've spent a significant amount of time on this issue and need to pivot back to coding, but I plan to revisit this problem soon. Any insights or suggestions would be greatly appreciated. The two more consistent approaches that I found was 1 and 2 PS.: I am using Bookworm too (Debian 12). |
Thanks, I will re-open the issue for now. |
Describe the bug
I just created a project, created the
.env
andlocal.py
files, ran when I run the commandmake docker_makemigrations
it simply don't work. I'm getting a permission denied:To Reproduce
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
cd theprojectname/backend/
cp theprojectname/settings/local.py.example theprojectname/settings/local.py
cp .env.example .env
.env
cd ..
make docker_setup
make docker_makemigrations
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: