Closed FlorianWege-IESE closed 2 years ago
Hey :) Here's what I think is happening: Your system does not seem to maintain the PWD environment variable, as stated by the logs:
WARNING: The PWD variable is not set. Defaulting to a blank string.
This means that docker cannot correctly mount any volumes using this variable (see compose.yml
).
So when NginX tries to convert the templates for its configuration, it does not find any templates and continues to use the default configuration.
Unfortunately I am not very experienced at working with Windows, but fixing this should involve setting the environment variable to your current folder or inserting it in compose.yml
directly (whereever you see ${PWD}
).
I stumbled upon the same problem and this issue helped my to find a solution.
As explained here https://stackoverflow.com/a/41948354, there is no need to use PWD at all. (You can find information on relative files in docker compose here: https://docs.docker.com.xy2401.com/compose/compose-file/compose-file-v1/)
All I had to do is replace the PWD
with a .
and everything worked.
Defining the variable PWD
at the top of the .env file worked as well:
PWD="."
COMPOSE_PROJECT_NAME="daps"
...
I think it would be helpful to change it in the projects .env
file as well to help others avoid this problem.
Yes, that's what it was. Now it works, thanks.
Wouldn't $PWD
as the current working directory also be inaccurate here? The file paths in the compose.yml are seemingly relative to the compose.yml. You could start docker-compose from another directory with the -f parameter. Another reply in that Stack Overflow thread talks about the difference of the PWD
variable vs .
: https://stackoverflow.com/questions/41948232/docker-compose-wont-find-pwd-environment-variable/41948354#comment113879072_41948354
@FlorianWege-IESE Yes, you are right. I originally did it that way because my docker compose installation was not accepting the dot for some reason. I think it is time to change that again
The Problem
My Setup
Microsoft Windows 10 Enterprise Version 10.0.19044 Build 19044 ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt] Docker version 20.10.7, build f0df350 OpenSSL 1.1.1e 17 Mar 2020
What I have done up front
Cloned the repository. Executed
git submodule update --init --remote
. Executeddocker-compose up
What I expected to happen
http://localhost:80
serves the UI.http://localhost:80/auth
does not respond with 404.http://localhost:80/.well-known/oauth-authorization-server/auth
does not respond with 404.http://localhost:80/auth/token
does not respond with 404.http://localhost:80/auth/jwks.json
does not respond with 404.What actually happened
http://localhost:80
showed the default nginx page:The other urls were respond to with 404 and the default nginx error page.
logs:
The quest of trying to solve it
What were the results of searching for the error on the internet?
I have not found anything on it. I have browsed through the issues of this repository.
What is your best guess as to what might have happened?
No idea. After it did not work with the default configuration, I have gone through the config files a bit but there seemed to be no additional base path set or anything contradictory. The logs do not look erroneous but also do not say that something would be served on port 80. I have also tried the steps in https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/tree/main/launchers/ids-connector#setting-up-a-local-daps-instance with the same result. But there it says that there should be a log line
omejdn-server_1 | == Sinatra (v2.1.0) has taken the stage on 4567 for development with backup from Thin
, which does not appear, but it does not seem to be up to date as the docker-compose file is named differently, too.