[GeoNode-users] Geonode at 2.9.0 Docker Installation CentOS

Julierme Pinheiro juliermeopensourcedeveloper at gmail.com
Tue Aug 28 12:08:51 PDT 2018


Hi Toni,

Thank you very much for your reply and highlights. I got it. Now, I have
only GeoNode-Project running in a CentOS VM and I am looking for a
documentation giving more insights on the use of GeoNode_Project installed
via docker. Looking at [1], the command line <docker-compose exec django
django-admin.py collectstatic --noinput>. works as well. I changed
site_base.css by adding the line <.home .jumbotron { background: yellow }>,
but after running collectstatic the static_root has not been created.
Also running the following commands according to [1], I get a warning:

docker-compose exec django django-admin.py loaddata
geonode/base/fixtures/initial_data.json
WARNINGS:
?: (urls.W002) Your URL pattern '^/?$' [name='home'] has a regex
beginning with a '/'. Remove this slash as it is unnecessary. If this
pattern is targeted in an include(), ensure the include() pattern has
a trailing '/'.
CommandError: No fixture named 'initial_data' found.


(geonode_project) [geo at gis geonode_project]$ docker-compose exec
django django-admin.py loaddata
geonode/base/fixtures/default_oauth_apps_docker.json
System check identified some issues:

WARNINGS:
?: (urls.W002) Your URL pattern '^/?$' [name='home'] has a regex
beginning with a '/'. Remove this slash as it is unnecessary. If this
pattern is targeted in an include(), ensure the include() pattern has
a trailing '/'.
CommandError: No fixture named 'default_oauth_apps_docker' found.

I removed '/' from urls.py but the Warnings remains.

Any away I could not figure out why static_root has not been created
after running collectstatic. Any additional comment on that will be
very appreciated.

Thank you all for the patience and help in advance.

Kind regards

Julierme

[1] http://geonode.org/dev-workshop/#/2/1





On Tue, Aug 28, 2018 at 2:53 AM Toni Schönbuchner <
toni.schoenbuchner at csgis.de> wrote:

> Dear Julierme,
>
> so if I understand correctly you installed two instances in your docker
> environment:
>
> - geonode (core)
> - geonode (project)
>
> If so I wouldn´t do it as as you´re writing ports will conflict. Maybe
> naming of containers,
> volumens as well.  May I ask you why do you need two instances running
> on that machine? If there is no other reason the for learning I would
> suggest to
> just run geonode-project as it´s there for customisations.
>
> Regarding collectstatics. So if I´m right and both are in a docker context
> have
> you tried to run the command not on your host but the django container?
>
> docker exec -it <container_id_or_name> python manage.py …
>
>
> cheers,
>
> Toni
>
>
> -----------------------------------------------
> CSGIS
>
> -----------------------------------------------
> Kolonnadenstraße 1
> 04109 Leipzig
> -----------------------------------------------
> Mobil +49/ (0) 176 6680 3198
> Tel  +49/ (0) 341 24 04 738
> Fax  +49/ (0) 341 24 04 73
> Web http://csgis.de
> -----------------------------------------------
>
> Hinweis gemäß § 33 BDSG
> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist
> ausschließlich für den
> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie
> diese E-Mail versehentlich
> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und
> löschen Sie diese Nachricht
> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung,
> Vervielfältigung, Veränderung,
> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>
> Am 27.08.2018 um 18:05 schrieb Julierme Pinheiro <
> juliermeopensourcedeveloper at gmail.com>:
>
> Hi Toni,
>
> Thank you very much for your reply. I am doing great. And I hope you are
> doing just wonderful. Yes, you are right. The files site_index.htm,
> site_base.html and site_base.css are ready to use. I configured/edit them
> in a geonode_project installed in a virtualenv in a Ubuntu at 16.04 server.
> Now I want to copy site_index.html, site_base.html and site_base.css. to a
> CentOS server that contains GeoNode and GeoNode_Project installed via
> docker.
>
> In Centos:
>
> 1  - GeoNode installed via Docker
>
> GeoNode was installed according to [1], except I use the command line:
>
> <docker-compose up --build -d>
>
>
> 2 - GeoNode_Project installed via Docker
>
> GeoNode was installed according to [2], and because Geonode_Project django
> container port was conflicting with GeoNode django port. I configured the
> files docker-compose.yml and docker-compose.override.yml as follow:
>
> docker-compose.yml
> geonode:
> ports:
>    -81:80
>
> docker-compose.override.yml
> django:
>
> GEONODE_LB_HOST_IP: 192.168.00.02
> GEONODE_LB_PORT: 81
> SITEURL: http://192.168.00.02/ <http://192.168.0.2/>
> ALLOWED_HOSTS: "['localhost', '192.168.0.02', '127.0.0.1', '::1']"
> GEOSERVER_PUBLIC_LOCATION: http://192.168.0.02/geoserver/
> <http://192.168.0.2/geoserver/>
>
>
> celery:
>
> GEONODE_LB_HOST_IP: 192.168.0.02
> GEONODE_LB_PORT: 81
> SITEURL: http://192.168.0.02/ <http://192.168.0.2/>
> ALLOWED_HOSTS: "['localhost', '192.168.0.02', '127.0.0.1', '::1']"
> GEOSERVER_PUBLIC_LOCATION: http://192.168.0.02/geoserver/
> <http://192.168.0.2/geoserver/>
>
> geoserver:
>
> GEONODE_LB_HOST_IP: 192.168.0.02
> GEONODE_LB_PORT: 81
>
> Said that, in the geonode_project folder, I am running python manage.py
> collectstatic  and I am hitting a error message shown bellow:
> File "manage.py", line 31, in <module>
>     execute_from_command_line(sys.argv)
>   File
> "/home/geo/Envs/geonode/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 364, in execute_from_command_line
>     utility.execute()
>   File
> "/home/geo/Envs/geonode/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 308, in execute
>     settings.INSTALLED_APPS
>   File
> "/home/geo/Envs/geonode/lib/python2.7/site-packages/django/conf/__init__.py",
> line 56, in __getattr__
>     self._setup(name)
>   File
> "/home/geo/Envs/geonode/lib/python2.7/site-packages/django/conf/__init__.py",
> line 41, in _setup
>     self._wrapped = Settings(settings_module)
>   File
> "/home/geo/Envs/geonode/lib/python2.7/site-packages/django/conf/__init__.py",
> line 110, in __init__
>     mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
> import_module
>     __import__(name)
>   File "/home/geo/geonode_project/geonode_project/settings.py", line 30,
> in <module>
>     from geonode.settings import *
> ImportError: No module named geonode.settings
>
>
> Am I missing any configuration? Could you give me a hint on that, please?
>
> I appreciated your time
>
> Kind regards
>
> Julierme
>
>
> [1]
> http://docs.geonode.org/en/master/tutorials/install_and_admin/running_docker/setup_docker_compose.html
>
> [2]https://github.com/GeoNode/geonode-project
>
>
>
>
>
>
>
>
>
> On Sat, Aug 25, 2018 at 4:56 PM Toni Schönbuchner <
> toni.schoenbuchner at csgis.de> wrote:
>
>> Hey Julierme,
>>
>> how are you doing? I haven´t followed the whole converersation.
>> Just my two cents, is it possible that your´re look in the wrong place?
>> Contrib app is a way to run multiple website. Are you looking for
>> templates
>> here? -> https://github.com/GeoNode/geonode/tree/master/geonode/templates
>> Like base.html, index.html and so on?
>>
>> If so it would be better to start with geonode_project:
>> https://github.com/GeoNode/geonode-project
>> here you can easily overwrite the files you mentioned here:
>> https://github.com/GeoNode/geonode-project/tree/master/project_name/templates
>> Without changing the core templates.
>>
>> cheers,
>>
>> toni
>>
>> -----------------------------------------------
>> CSGIS
>>
>> -----------------------------------------------
>> Kolonnadenstraße 1
>> 04109 Leipzig
>> -----------------------------------------------
>> Mobil +49/ (0) 176 6680 3198
>> Tel  +49/ (0) 341 24 04 738
>> Fax  +49/ (0) 341 24 04 73
>> Web http://csgis.de
>> -----------------------------------------------
>>
>> Hinweis gemäß § 33 BDSG
>> Daten der Verfahrensbeteiligten werden gespeichert. Dieses Dokument ist
>> ausschließlich für den
>> Adressaten bestimmt. Der Inhalt der E-Mail ist vertraulich. Falls Sie
>> diese E-Mail versehentlich
>> erhalten haben, rufen Sie uns unter obiger Rufnummer umgehend an und
>> löschen Sie diese Nachricht
>> von Ihrem Computer. Jegliche Art von Reproduktionen, Verbreitung,
>> Vervielfältigung, Veränderung,
>> Verteilung und/oder Veröffentlichung dieser E-Mail ist verboten.
>>
>> Am 25.08.2018 um 21:00 schrieb geonode-users-request at lists.osgeo.org:
>>
>> Message: 1
>> Date: Fri, 24 Aug 2018 18:02:26 -0300
>> From: Julierme Pinheiro <juliermeopensourcedeveloper at gmail.com>
>> To: francesco bartoli <xbartolone at gmail.com>
>> Cc: geonode-users <geonode-users at lists.osgeo.org>
>> Subject: Re: [GeoNode-users] Geonode at 2.9.0 Docker Installation CentOS
>> - Templates
>> Message-ID:
>> <CAKTKyJKomRPN8nTi-S7yLhk-S7BoH3wTmHDyEDEryx4WxoDCxQ at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi Francesco,
>>
>> Thank you very much for reply.
>>
>> I went back and ran the command < docker-compose up --build -d>, but I am
>> still not getting any success by editing the file site_index.html in
>> ./geonode/contrib/geosites/site_template/templates/site_index.html.
>>
>> I appreciated your time.
>>
>> Julierme
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20180828/88529a17/attachment-0001.html>


More information about the geonode-users mailing list