juliusknorr / nextcloud-docker-dev

Nextcloud development environment using docker-compose
GNU Affero General Public License v3.0
143 stars 74 forks source link

Page not found after running docker compose up on rancher desktop #322

Open liebsoer opened 7 months ago

liebsoer commented 7 months ago

Hi :)

I cloned the repository, ran ./bootstrap.sh groupfolders inside the repository and started everything with docker compose up -d nextcloud. Everything looks fine so far. I got no errors and can see all container up and running.

When I try to access nextcloud.local, I get a 404 Page not found. Starting nextcloud 2 with docker compose up -d nextcloud2 I get the same issue using nextcloud.local and/or nextcloud2.local. When I then use nextcloud2.local:8211, I get an login screen. I assume its because a port is exposed for nextcloud2. The PORTBASE is defined as 821 in the .env file. The DOCKER_SUBNET in .env is 192.168.21.0/24.

I haven't modified any config file in the repo.

If the content of any of the files is needed for further analysis or any other information, please say what is needed and I will post it :)

As I am not that deep into Docker Compose and Rancher Desktop, I can't find a solution to make it work. Also asking ChatGPT hasn't helped me.

What can I do or what do I have to change in the config files to make it work?

P.S. Using the standalone version (run --rm -p 8080:80 ghcr.io/juliushaertl/nextcloud-dev-php83:latest) works fine.

juliusknorr commented 7 months ago

Using the docker-compose setup there wil be a proxy container started that distributes requests bassed on the hostname (e.g. nextcloud.local). You could check with docker-compose logs -f proxy if that is actually handling the 404 response. If not, do you maybe have another webserver running on port 80 on your machine?

liebsoer commented 7 months ago

It looks like rancher desktop is running ssh on port 80. For that I don't see the proxy handling the request.

Wenn I set the env variable PROXY_PORT_HTTP=8880 I can see that the proxy handling the request but the browser is redirecting from nextcloud.local:8880 to http://nextcloud.local/index.php/login 🤔

Is there a way to set the base URL of Nextcloud to nextcloud.local:8880 as well? 🤔

juliusknorr commented 7 months ago

According to https://github.com/rancher-sandbox/rancher-desktop/issues/1194 rancher comes with its own reverse proxy, supporting that might be a bit of work, for now maybe you can check if you can disable that as the issue mentions there should be a setting

juliusknorr commented 7 months ago

From a quick look for supporting the external traefik we might need to add labels to all the containers as described in https://doc.traefik.io/traefik/user-guides/docker-compose/basic-example/

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
      - "traefik.http.routers.whoami.entrypoints=web"
leochoo commented 2 months ago

I actually have the same issue in the Docker Desktop as well.

339

https://github.com/juliushaertl/nextcloud-docker-dev/issues/339