Django, nginx & gunicorn.

Hi all,

Docker noob who needs help.

I have a project directory. For the sake of this query, all that's in it are some python scripts, a django_folder and a docker-compose.yml.

My docker is set up like this:

How, using docker can I update the python path so that the dockerised django_folder may access & import the python scripts in this project directory? Or is there a better way?

I'm getting an error on my django like:

 ModuleNotFoundError at / No module named 'aPythonScriptInTheProjectDirectory' 

However, this works fine if I run runserver (as opposed to running it with docker) as the contains

# Add the parent directory of the Django project as a path. # Useful for imports sys.path.append(os.path.abspath('../')) 

I can't put the python scripts into the Django folder.

submitted by /u/Jafbuya
[link] [comments]
Source: Reddit