Closed ally-ssa closed 1 year ago
@ally-ssa Please let me know if the following works for you:
When cloning the private modules, this token functions as the password.
git clone --branch spade-for-isms --recurse-submodules https://github.com/ADB-SPADE/geonode-spade.git
cd geonode-spade
code .
Now VS Code should give the option to "Reopen in Container". Now a docker-compose project will be set up, based on the contents of the .devcontainer folder.
In the django4geonode container (VS Code terminal should open here automatically), run python manage.py runserver 0.0.0.0:8000
Now the whole application should be available on http://localhost with the integration between Django & GeoServer intact. The Django application should also be available on http://localhost:8000.
Hi @ewsterrenburg, thanks for the comment. I was able to clone the source code including the submodules without problems this time, but I encounter this error when reopening geonode-spade
in a dev container:
There seems to be a permission error, even though the directory where geonode-spade
is located has permission 775
@ally-ssa https://stackoverflow.com/questions/38882654/docker-entrypoint-running-bash-script-gets-permission-denied, https://stackoverflow.com/questions/72883508/unable-to-start-container-process-permission-denied-unknown, would it help to make the entrypoint shellscript executable?
Thanks, got the permission issue resolved by running
sudo chmod 775 entrypoint.sh
Unfortunately the 404 issue is still there ☹
Discovered that the app was encountering issues when run in WSL on port 8000, and using one of these workarounds helped:
python manage.py runserver 0.0.0.0:9000
which allowed me to access the app using http://localhost:9000. Note from @ewsterrenburg that dev container .env and nginx Dockerfile may have to be updated to change the references to port 8000 to 9000
python manage.py runserver 0.0.0.0:8000
but I access the app in browser using http://<WSL_IP_ADDRESS>:8000
instead of http://localhost:8000. The WSL IP address can be determined using ip addr show eth0
or hostname -I
Expected Behavior
After starting the Django server following the steps of starting GeoNode locally in development mode, when I open http://localhost:8001/ I should be able to see a blank GeoNode page with a "Welcome to GeoNode" message, as in
Actual Behavior
http://localhost:8001/ shows a blank container under the navbar (see example below):
in addition, I see the following in DevTools:
When I go to another page, for example Maps, the page is stuck on loading screen:
And I also see 404 errors in DevTools:
Steps to Reproduce the Problem
Docker
anddocker-compose
using GeoNode documentation as referencegeonode-spade
repo then checked out thespade-for-isms
branchsafeguard-screening-map
submodule, though I was able to load it usingDocker UP
docker-compose --env-file .env_dev_egis -f docker-compose.yml -f ./docker-compose.egis-local.dev.yml up -d
Enter django container shell
docker exec -it django4geonode /bin/bash
Start Django server in development mode
python manage.py runserver 0.0.0.0:8001