Hi! I'm working on a Django project using Docker and I've successfully created the Dockerfile and docker-compose.yml file. Pycharm running very well. However, I'm experiencing an issue when trying to use the Django console. The container created by the console does not seem to receive any environment variables from the docker-compose file, and even when I manually add these variables, the container is unable to connect to the database container. It seems that it is unable to find the host.
Can anyone help me with this problem?
This is the Starting Script:
import sys; print('Python %s on %s' % (sys.version, sys.platform))
import django; print('Django %s' % django.get_version())
if 'setup' in dir(django): django.setup()
import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)
This is my docker-compose.yml:
command: python manage.py runserver 0.0.0.0:8000
Please let me know if there is anything else