Geonode: migration to production failing on docker for windows WSL2

Created on 10 Oct 2020  路  2Comments  路  Source: GeoNode/geonode

I'm trying to create a container instance on docker for windows WSL2, but keep running into the issue where the django4geonode container shows a looping error:

Starting periodic command scheduler: cron.

DATABASE_URL=postgres://geonode:geonode@db:5432/geonode

GEODATABASE_URL=postgis://geonode_data:geonode_data@db:5432/geonode_data

SITEURL=http://localhost/

ALLOWED_HOSTS=['localhost', 'localhost', 'localhost:None', 'geonode', 'django']

GEOSERVER_PUBLIC_LOCATION=http://localhost/geoserver/

MONITORING_ENABLED=True

MONITORING_HOST_NAME=geonode

MONITORING_SERVICE_NAME=local-geonode

MONITORING_DATA_TTL=7

waitfordbs task done

running migrations

migrations task done

DOCKER_ENV=production

Traceback (most recent call last):

File "/usr/local/bin/invoke", line 8, in <module>

sys.exit(program.run())

File "/usr/local/lib/python3.8/site-packages/invoke/program.py", line 384, in run

self.execute()

File "/usr/local/lib/python3.8/site-packages/invoke/program.py", line 566, in execute

executor.execute(*self.tasks)

File "/usr/local/lib/python3.8/site-packages/invoke/executor.py", line 129, in execute

result = call.task(*args, **call.kwargs)

File "/usr/local/lib/python3.8/site-packages/invoke/tasks.py", line 127, in __call__

result = self.body(*args, **kwargs)

File "/usr/src/app/tasks.py", line 196, in prepare

_prepare_oauth_fixture()

File "/usr/src/app/tasks.py", line 422, in _prepare_oauth_fixture

"client_id": "{0}".format(os.environ['OAUTH2_CLIENT_ID']),

File "/usr/local/lib/python3.8/os.py", line 675, in __getitem__

raise KeyError(key) from None

KeyError: 'OAUTH2_CLIENT_ID'

Running the container in developer environment does not show the error, but the same part just loops over and over.

Most helpful comment

Hi Bram

Quick question. How did you checkout the source code from github? I have run into the same problem in the past, bit now I do a git clone https://github.com/GeoNode/geonode --config core.autocrlf=input --depth 1 (the part --config.... is a hint from WebODM,).

Geonode runs perfectly on my WSL2 based docker for Windows.

Hope this helps.

PIeter

All 2 comments

Hi Bram

Quick question. How did you checkout the source code from github? I have run into the same problem in the past, bit now I do a git clone https://github.com/GeoNode/geonode --config core.autocrlf=input --depth 1 (the part --config.... is a hint from WebODM,).

Geonode runs perfectly on my WSL2 based docker for Windows.

Hope this helps.

PIeter

Hi Bram

Quick question. How did you checkout the source code from github? I have run into the same problem in the past, bit now I do a git clone https://github.com/GeoNode/geonode --config core.autocrlf=input --depth 1 (the part --config.... is a hint from WebODM,).

Geonode runs perfectly on my WSL2 based docker for Windows.

Hope this helps.

PIeter

Thanks! Tried it on a fresh environment, and works out of the box!
This should be added to the docker installation instructions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kikislater picture kikislater  路  7Comments

gannebamm picture gannebamm  路  6Comments

jondoig picture jondoig  路  8Comments

Coop56 picture Coop56  路  10Comments

pjduplooy picture pjduplooy  路  7Comments