<div dir="ltr"><div><div><div><div><div>Dear List,<br><br></div>I'm currently working on setting up a Geonode deployment method using Docker for our needs and thought it may of some interest to others, so I'd like to share it here. Note that 
I'm relatively new to Geonode AND Docker, so there are definitely some aspects that could (and will) be improved.<br><br></div>The main goal is to make a setup that is easy and <u>production-ready</u> but still completely customizable.<br></div><div><br></div><div>At this point, here are the key features :<br><br></div><div>1. easy and clean to customize (it's a regular Django-Geonode project)<div>2. setup can be used both for development and for production<br></div>

</div><div>3. out of the box https encryption (using free Let's Encrypt certificates)<br></div><div>4. out of the box backups (Amazon S3 and/or Syncthings)</div><div>5. Geoserver uses Geonode user/groups from database for authentication (meaning geonode users === geoserver users, including groups)<br></div><div>6. Geoserver's data directory properly initialized (no risk of breach if user forgets to change admin/root passwords)<div>7. Rancher catalog entry (makes it possible to install through GUI only e.g. on amazon instances, especially nice if you deploy a lot of instances)<br>
<div><br></div><div>For those not familiar with Docker, this basically 
means that you can have Geonode installed with all related services under Linux, Windows or Mac OS with
 this command (well, you need Docker and Docker-compose installed, but that's not a big challenge) :<span style="font-family:monospace,monospace"><br>docker-compose up</span></div>

<br>I'm aware there is already the geonode-project repository that also has a Docker-compose setup, and that is very similar. I don't want to duplicate anything (but just needed to start from scratch to really understand , and if there's some interest, I'm willing to contribute back to geonode-project.<br><br>Here are the main differences (plus features 3-7 above) between geonode-project and my setup:<br><br></div><div>- All dockerfiles customized for geonode (django, geoserver, nginx and some others) are in the same github/dockerhub repo, rather than spread across several github/dockerhub repositories. This makes it much easier to know what's happening and make releases (push one tag push in one repo, then dockerhub autobuilds do the rest).<br></div><div>- Where possible, the images are based on linux alpine instead of Ubuntu, making the images much lighter<br></div><div>- All other service images use version tags (rather than just pulling latest) so that two builds will always deploy exactly the same stack)<br></div><div>- Sensitive information (admin password...) are defined using Docker secrets instead of environment variables. Those are much less subject to be leaked (in a forgotten debug statement for instance).<br></div><div>- Celery worker activity is reported in the django admin<br></div><div>- Almost all django settings are inherited from Geonode.</div><div><br></div><div>I think with the inputs of more experienced Geonode devs, I could push this forward, and maybe at some point we could support it as an official way to deploy Geonode.<br>While not perfect and probably not adapted to all cases, I think it would be a big improvement over the current deployment method through apt-get which is definitely not production-ready, even if used that way by a lot of users. <br>Also it's true that some aspects are a bit out of Geonode's scope (backups, ssl), but as they are common to any real life deployement, I think it's not a bad idea to integrate those into official deployement methods (we'd progressively stop seeing all those unsecured Geonode install)</div><div><br></div></div><div>Here's the main branch :<br><a href="https://github.com/olivierdalang/SPCgeonode" target="_blank">https://github.com/<wbr>olivierdalang/SPCgeonode</a><br><br></div><div>Here's a how customized geonode project would look like (work in progress):<br><a href="https://github.com/olivierdalang/SPCgeonode/tree/example_project" target="_blank">https://github.com/<wbr>olivierdalang/SPCgeonode/tree/<wbr>example_project</a><br></div><div><br></div><div>Here's the Rancher catalog (look for "spcgeonode"):<br><a href="https://github.com/PacificCommunity/rancher-catalogue" target="_blank">https://github.com/<wbr>PacificCommunity/rancher-<wbr>catalogue</a><br><br></div><div><br></div>Let me know what you think !<br><br></div>Kind regards,<br><br></div>Olivier<br><div><div><div><div><div><br><br><br><br></div></div></div></div></div></div>