Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

740
Visualizações
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!

over 4 years ago · Santiago Trujillo
6 Respostas
Responde à pergunta

0

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

over 4 years ago · Santiago Trujillo Relatório

0

Look at the "Use Docker Compose V2" option. It seems it's ON now

over 4 years ago · Santiago Trujillo Relatório

0

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

over 4 years ago · Santiago Trujillo Relatório

0

(Sorry about the answer - I don't yet have the rep to comment)

Just want to add a note on to the answer by D.Mo - I had the same error this morning, and adding quotes around the values in my .env file did seem to resolve the issue.

Though I then noticed that in the documentation for these env files, Docker mentions

There is no special handling of quotation marks. This means that they are part of the VAL.

Just wanted to point that out in case anyone ran into issues with this.

I will likely just keep this change locally until others in my team experience the same problem - unless someone can confirm that the ENV values should now have ""s around them.

FWIW I could not find a way to disable Docker Compose V2 (I'm on Arch, Docker v20.10.9) - docker-compose disable-v2 isn't a valid command for me (see here for what I assume is the (imo silly) reason).


Edit - I ended up reverting to a previous version of docker-compose as the constant workarounds I had to implement weren't fun. I did so after seeing this - I ended up looking around yay -U /var/cache/pacman/pkg/docker-compose- and tab-complete gave me a list of cached versions. I went with 1.29.2-1 and things have been working perfectly again since then. Will just have to see what happens in future updates etc.

over 4 years ago · Santiago Trujillo Relatório

0

For me running docker-compose disable-v2 fixed the issue

over 4 years ago · Santiago Trujillo Relatório

0

For latest mac M1. Use the UI to disable

Use Docker Compose V2

or in terminal docker-compose disable-v2

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda