Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting Django with docker unexpected character

I'm trying to start up this Project on my Mac https://github.com/realsuayip/django-sozluk It works on my Windows machine, but I got this Error on my Mac:

unexpected character "." in variable name near "127.0.0.1 192.168.2.253\nDJANGO_SETTINGS_MODULE=djdict.settings_prod\n\n\nSQL_ENGINE=django.db.backends.postgresql\nSQL_PORT=5432\nDATABASE=postgres\nSQL_HOST=db\n\nSQL_DATABASE=db_dictionary\nSQL_USER=db_dictionary_user\nSQL_PASSWORD=db_dictionary_password\n\n\nEMAIL_HOST=eh\nEMAIL_PORT=587\nEMAIL_HOST_USER=eh_usr\nEMAIL_HOST_PASSWORD=pw" furkan@MacBook-Air-von-Furkan gs %

Any help would be much appreciated!

like image 222
JohnJonta Avatar asked Oct 07 '21 17:10

JohnJonta


2 Answers

Turning off the "Use Docker Compose V2" flag in the settings did it for me.

like image 110
Jordan Paulino Avatar answered Oct 01 '22 00:10

Jordan Paulino


I had a similar problem with a docker container. It probably appears after a system update under my linux. I can't say anything about the reason, but try following:

Quote the variable values in file ".env" of the Project, such as:

DEBUG=0
SECRET_KEY=foo
DJANGO_ALLOWED_HOSTS="localhost 127.0.0.1 192.168.2.253"
DJANGO_SETTINGS_MODULE="djdict.settings_prod"


SQL_ENGINE="django.db.backends.postgresql"

# ...

And try again

like image 28
D.Mo Avatar answered Oct 01 '22 00:10

D.Mo