Reputation: 3022
I'm trying to run dockerfiles/django-uwsgi-nginx with my django project.
https://github.com/dockerfiles/django-uwsgi-nginx
1.I replaced 'app' folder by my django project folder.
2.Comment out this line form Dockerfile
#RUN django-admin.py startproject mailzon /home/docker/code/app/
3.docker build -t my_app_name .
4.docker run -d -p 80:80 my_app_name
Then I opened http://127.0.0.1/ I got error message. [ Internal Server Error ]
last line of the manual.
uWSGI chdirs to /app so in uwsgi.ini you will need to make sure the python path to the wsgi.py file is relative to that.
I think I need this setting. but I'm not sure about uWSGI and this setting. What should I do next...?
Please tell me how to resoleve this problem.
Upvotes: 0
Views: 599
Reputation: 6113
Probably there's something wrong when you "replaced 'app' folder [with your] django project folder". The dockerfile is configured to refer to that directory by the name /.../app
, and if you replace it with /.../myproject
it'll fail to find it. You probably want to edit the uwsgi.ini
file to point to the new app folder's name. That is probably the only change you'll need, but there might be other references to the original /.../app
path that need to get tweaked as well.
Upvotes: 0