[GeoNode-users] Develop with docker container

Pierre HARDY pierre.hardy5 at gmail.com
Wed Mar 2 06:50:47 PST 2022


Thanks a lot Florian,

*Your answer solved my problem.*

I made the changes accordingly to your commit and my django4geonode
container is running.
In order to avoid issues at reaching the django dev server through nginx
reverse proxy (configured to communicate with WSGI), I had to modify the
.devcontainer/docker-compose.yml file as follows:

  django:

    restart: "no"

    healthcheck:
      test: "echo \"I'm alive.\""


    env_file:
      - .devcontainer/.env

    volumes:
      - '.:/usr/src/geonode'

    command: tail -f /dev/null

    ports:
      - 8000:8000

Maybe the docs might be improved to clarify,

Thank again to you and Alessio.

Best regards,

Pierre HARDY




Le mer. 2 mars 2022 à 14:49, Florian Hoedt <florian.hoedt at thuenen.de> a
écrit :

> Hi Pierre,
>
> I have done some changes to get a docker dev env running with PyCharm
> (commercial ed.). You can see my changes and comment here:
>
> https://github.com/GeoNode/geonode/pull/8177#issuecomment-954673780
>
>
> https://github.com/gannebamm/geonode/commit/50881f66204c34ef26538bc3015b99a1e5d9947f
>
> maybe that helps
> yours,
> Florian
> --
> MSc Florian Hoedt
> Head Research Data Management | OpenData Representative
> Thünen Institute, Centre for Information Management
> Bundesallee 44
> 38116 Braunschweig
>
> Tel:   +49 531 596-1428 | Mobile: +49 162 92 50 275
> Fax:   +49 531 596-1499
> Mail:  florian.hoedt at thuenen.de
> Web:   www.thuenen.de
>
> The Johann Heinrich von Thünen Institute, Federal Research Institute for
> Rural Areas, Forestry and Fisheries – Thünen Institute in brief – consists
> of 15 specialized institutes with socioeconomic, ecological and
> technological expertise. The Thünen Institute conducts research and policy
> advice related to rural areas, agriculture, forests and fisheries.
>
> ------------------------------
> *Von: *"Pierre HARDY" <pierre.hardy5 at gmail.com>
> *An: *"Alessio Fabiani" <alessio.fabiani at geosolutionsgroup.com>
> *CC: *"geonode-users" <geonode-users at lists.osgeo.org>
> *Gesendet: *Mittwoch, 2. März 2022 14:43:53
> *Betreff: *Re: [GeoNode-users] Develop with docker container
>
> Geonode version:
> *3.3.1 (downloaded from release on github)*
> OS: Centos 7
>
> Following your recommendation, I have done the following:
>
>    - *Trial no. 1*
>
>
> *docker-compose --project-name geonode -f docker-compose.yml -f
> .devcontainer/docker-compose.yml up*
>
> Which returned this:
>
> *django4geonode   | No idea what 'devrequirements' is!*
>
> *django4geonode exited with code *
>
>
>    - *Trial no. 2*
>
> *docker-compose --project-name geonode -f docker-compose.yml -f
> .devcontainer/docker-compose.yml build*
>
> *docker-compose --project-name geonode -f docker-compose.yml -f
> .devcontainer/docker-compose.yml up*
>
> Which returned this:
>
> *django4geonode   | No idea what 'devrequirements' is!*
>
> *django4geonode exited with code *
>
> My .env file is the default one, I juste replaced "localhost" by my
> domain name.
> I am working on remote server because my local machine is under windows OS
> and I have issues at running the project locally (even inside docker) due
> to line return encoding (LF/CRLF)
> Everything is working fine when I run docker-compose up (I tested file
> upload).
>
> Le mer. 2 mars 2022 à 12:22, Alessio Fabiani <
> alessio.fabiani at geosolutionsgroup.com> a écrit :
>
>> Which version?
>> If you start the container by using the following command
>>
>> docker-compose --project-name geonode -f docker-compose.yml -f .devcontainer/docker-compose.yml up
>>
>>
>> that should override the django container default command so things don't
>> shut down after the process ends (see here
>> <https://github.com/GeoNode/geonode/blob/master/.devcontainer/docker-compose.yml#L50>
>> for more details).
>> This won't start the uwsgi command on the 8000 port too.
>>
>> On Wed, Mar 2, 2022 at 12:05 PM Pierre HARDY <pierre.hardy5 at gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I following the instruction stated here: URL
>>> <https://docs.geonode.org/en/3.3.x/devel/docker/index.html#start-to-develop-with-docker>
>>> Using vscode extension, I can start a terminal session inside the
>>> django4geonode container.
>>>
>>> However, when I try to run the container on port 8000 it seems that the *uwsgi
>>> *service is already running:
>>>
>>> [image: image.png]
>>>
>>> I can run the server on port 8800. However I would like to run it on the
>>> port 8000 in order to have access to it remotely (it will be then served by
>>> NGINX).
>>>
>>> It there a way to do start dev server on port 8000 ?
>>>
>>> Thanks !
>>>
>>> --
>>> Pierre HARDY
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>
>>
>> --
>>
>> Regards,
>>
>> Alessio Fabiani
>>
>> ==
>> GeoServer Professional Services from the experts!
>>
>> Visit http://bit.ly/gs-services-us for more information.
>> ==
>>
>> Ing. Alessio Fabiani
>>
>> @alfa7691
>> Founder/Technical Lead
>>
>>
>> GeoSolutions Group
>> phone: +39 0584 962313
>>
>> fax:     +39 0584 1660272
>>
>> mob:   +39  333 8128928
>>
>> https://www.geosolutionsgroup.com/
>>
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>> precisa che ogni circostanza inerente alla presente email (il suo
>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>
>> This email is intended only for the person or entity to which it is
>> addressed and may contain information that is privileged, confidential or
>> otherwise protected from disclosure. We remind that - as provided by
>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>> e-mail or the information herein by anyone other than the intended
>> recipient is prohibited. If you have received this email by mistake, please
>> notify us immediately by telephone or e-mail.
>>
>
>
> --
> Pierre HARDY
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>


-- 
Pierre HARDY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20220302/87087af0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 23505 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20220302/87087af0/attachment-0001.png>


More information about the geonode-users mailing list