Git Product home page Git Product logo

Comments (12)

urre avatar urre commented on June 18, 2024

Hey, did did you create an .env file with the desired domain?

from wordpress-nginx-docker-compose.

humblecoder avatar humblecoder commented on June 18, 2024

I did indeed. My .env file looks like so:

IP=127.0.0.1
APP_NAME=wpdocker
DOMAIN=wpdocker.local
DB_HOST=mysql
DB_NAME=wpdocker
DB_ROOT_PASSWORD=password
DB_TABLE_PREFIX=wp_

When I docker compose up I receive the following error regarding nginx: invalid number of arguments in "server_name" directive. When I output the string to debug it, ${DOMAIN} is empty

All other values (e.g. APP_NAME) get pulled properly, but in that specific entrypoint: string, variable doesn't get pulled/parsed. Is there, perhaps, something about the entrypoint string that .env vars don't get interpolated?

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

Hm. Strange, haven't had any issues with this. What OS are you on?

from wordpress-nginx-docker-compose.

humblecoder avatar humblecoder commented on June 18, 2024

Still running MacOS Catalina 10.15.7 with Docker Desktop v3.0.3(51017)

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

Interesting. I haven't heard any issues with this and I know many people that use it. But I'll do some investigating

from wordpress-nginx-docker-compose.

humblecoder avatar humblecoder commented on June 18, 2024

Much appreciated. Even performed a fresh pull and still the same thing. Hoping I'm just missing something obvious.

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

Hey! Can you try this PR i just created?

I think this will work better in more setups.

Do docker-compose rm -v first and then docker-compose up again

from wordpress-nginx-docker-compose.

humblecoder avatar humblecoder commented on June 18, 2024

So, I pulled the PR, reset the container, forced a rebuild, and it still got the same error. However, after adjusting the environment like so, it worked:

environment:
      - NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf"
      - DOMAIN=${DOMAIN}

Now, I'm receiving a PR_END_OF_FILE_ERROR when attempting to connect over https, and some MySQL connection issues as well. That said, the interpolation-specific issue can be considered resolved. Much appreciated!

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

thanks! Yes, I forgot the dashes in the environment: and it should be = instead of :.

Investigating PR_END_OF_FILE_ERROR further

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

Now this is fixed. I've also fixed the SSL errors and PR_END_OF_FILE_ERROR.

Please test again. I'm merging this later

from wordpress-nginx-docker-compose.

humblecoder avatar humblecoder commented on June 18, 2024

That fixed the SSL issue. I'll take a closer look at the MySQL issue (and perhaps log a more coherent bug) if I get some time in the coming days. Thanks!

from wordpress-nginx-docker-compose.

urre avatar urre commented on June 18, 2024

The PR is is now merged.

Thanks!

from wordpress-nginx-docker-compose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.