geonode-project icon indicating copy to clipboard operation
geonode-project copied to clipboard

Reorganize and deduplicate Docker configurations

Open giohappy opened this issue 10 months ago • 23 comments

Context

  • At the moment we have a mix of configurations from which we build the published Docker images:
  • We have duplicated configurations between geonode and geonode-project:
    • nginx
      • https://github.com/GeoNode/geonode-project/tree/master/docker/nginx
      • https://github.com/GeoNode/geonode/tree/master/scripts/docker/nginx
    • letsencrypt:
      • https://github.com/GeoNode/geonode-project/tree/master/docker/letsencrypt
      • https://github.com/GeoNode/geonode/tree/master/scripts/docker/letsencrypt
  • geonode-project is meant for customized versions of GeoNode, so having the ability to build custom images for the services fits well here
  • by default both geonode and geonode-project should use the published images

Problems

  • We have duplicated configurations
  • Building and publishing from a single place (geonode-project's own Docker configurations) is convenient BUT the versioning of images would be impossible. This is already happening for Geoserver.
  • For most cases, there's no need to have local builds. This can also be problematic for bug tracking and troubleshooting within projects.

Solutions

Solution A

  • Restore all the specific repos for the Docker images, including Letsencrypt, Nginx, and Docker, and remove the docker configs from geonode and geonode-project
    • These will be the repos from which the official images will be tracked and built
  • Adopt multi-stage builds inside projects if a custom image is needed.
  • Pros:
    • Cleaner management
    • Versioning
  • Cons:
    • More work for its maintenance
    • The solution for building and deploying custom images in projects will be in the end of the final developer

Solution B

  • centralize all the configurations inside the geonode-project but make its docker-compose.yml use the official images by default
  • deprecate the specific Docker repos with the downside of loosing versioning for the single images
  • For this we already have a draft PR
  • Pros:
    • Easier to manage
    • A Docker configuration already available for a custom builds
  • Cons:
    • No versioning for images

Opinions?

giohappy avatar Aug 25 '23 09:08 giohappy