Skip to content

Commit

Permalink
Radical Docker restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
ridoo committed Aug 30, 2023
1 parent 7609aaf commit c7e7776
Show file tree
Hide file tree
Showing 105 changed files with 190 additions and 10,399 deletions.
43 changes: 35 additions & 8 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
COMPOSE_PROJECT_NAME={{project_name}}
COMPOSE_PROJECT_NAME=geonode


##
## DOCKER CONFIGURATION

# (optional) URL with trailing slash
DOCKER_REGISTRY=
# (optional) with trailing slash e.g. sample/ or orga/
DOCKER_REPOSITORY=
PROJECT_VERSION="1.0"
GEONODE_BASE_IMAGE_VERSION="4.1.2"
# version should make transparent which GeoNode version
# it can be used in, e.g. '4.1.2-1.25.1'
NGINX_BASE_IMAGE_VERSION="1.25.1"
# TODO Please point to a proper base version here
LETSENCRYPT_BASE_IMAGE_VERSION=latest
# version should make transparent which GeoNode version
# it can be used in, e.g. '4.1.2-2.23.0'
GEOSERVER_BASE_IMAGE_VERSION="2.23.0"
# version should make transparent which GeoNode version
# it can be used in, e.g. '4.1.2-2.23.0'
GEOSERVER_DATA_BASE_IMAGE_VERSION="2.23.0"
# version should make transparent which GeoNode version
# it can be used in, e.g. '4.1.2-13'
POSTGRES_BASE_IMAGE_VERSION="13"


# See https://github.com/containers/podman/issues/13889
# DOCKER_BUILDKIT=0
DOCKER_ENV=production
Expand All @@ -14,26 +41,26 @@ INVOKE_LOG_STDOUT=true
# LANGUAGE_CODE=it-it
# LANGUAGES=(('en-us','English'),('it-it','Italiano'))

DJANGO_SETTINGS_MODULE={{project_name}}.settings
DJANGO_SETTINGS_MODULE=geonode.settings
GEONODE_INSTANCE_NAME=geonode

# #################
# backend
# #################
POSTGRES_USER=postgres
POSTGRES_PASSWORD={pgpwd}
GEONODE_DATABASE={{project_name}}
GEONODE_DATABASE_USER={{project_name}}
GEONODE_DATABASE=geonode
GEONODE_DATABASE_USER=geonode
GEONODE_DATABASE_PASSWORD={dbpwd}
GEONODE_GEODATABASE={{project_name}}_data
GEONODE_GEODATABASE_USER={{project_name}}_data
GEONODE_GEODATABASE=geonode_data
GEONODE_GEODATABASE_USER=geonode_data
GEONODE_GEODATABASE_PASSWORD={geodbpwd}
GEONODE_DATABASE_SCHEMA=public
GEONODE_GEODATABASE_SCHEMA=public
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_URL=postgis://{{project_name}}:{dbpwd}@db:5432/{{project_name}}
GEODATABASE_URL=postgis://{{project_name}}_data:{geodbpwd}@db:5432/{{project_name}}_data
DATABASE_URL=postgis://geonode:{dbpwd}@db:5432/geonode
GEODATABASE_URL=postgis://geonode_data:{geodbpwd}@db:5432/geonode_data
GEONODE_DB_CONN_MAX_AGE=0
GEONODE_DB_CONN_TOUT=5
DEFAULT_BACKEND_DATASTORE=datastore
Expand Down
103 changes: 0 additions & 103 deletions .override_dev_env.sample

This file was deleted.

45 changes: 0 additions & 45 deletions Dockerfile

This file was deleted.

21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# {{ project_name|title }}
# My Custom GeoNode Project

GeoNode template project. Generates a django project with GeoNode support.
GeoNode project setup using Docker.
Makes use of pre-built Docker images and prepared for your customizations.

## Table of Contents

Expand All @@ -18,17 +19,9 @@ GeoNode template project. Generates a django project with GeoNode support.
## Quick Docker Start

```bash
python3.10 -m venv ~/.venvs/project_name
source ~/.venvs/{{ project_name }}/bin/activate

pip install Django==3.2.*

mkdir ~/project_name

GN_VERSION=master
django-admin startproject --template=https://github.com/GeoNode/geonode-project/archive/refs/tags/$GN_VERSION.zip -e py,sh,md,rst,json,yml,ini,env,sample,properties -n monitoring-cron -n Dockerfile project_name ~/project_name
git clone https://github.com/GeoNode/geonode-project/

cd ~/project_name
cd ~/geonode-project
python create-envfile.py
```
`create-envfile.py` accepts the following arguments:
Expand All @@ -47,12 +40,14 @@ GeoNode template project. Generates a django project with GeoNode support.
- `--geodbpwd`: GeoNode data DB user role's password. A random value is set if left empty
- `--clientid`: Client id of Geoserver's GeoNode Oauth2 client. A random value is set if left empty
- `--clientsecret`: Client secret of Geoserver's GeoNode Oauth2 client. A random value is set if left empty

```bash
docker compose build
docker compose up -d
```

In case you want to customize the Docker images for Geoserver, Nginx, PostGIS, Letsencrypt or the data-dir setup, you can use the `docker-compose-local-builds.yml` override, which builds the images from the `./docker/*` subfolders
In case you want to customize the Docker images for Geoserver, Nginx, PostGIS, Letsencrypt or the data-dir setup, make your changes under `docker/<components>/Dockerfile`.
You can also mount your changes via Docker volumes in the `docker-componse.yml` file.

## Developer Workshop

Expand Down
70 changes: 0 additions & 70 deletions Vagrantfile

This file was deleted.

58 changes: 0 additions & 58 deletions Vagrantfile.stack

This file was deleted.

1 change: 1 addition & 0 deletions create-envfile.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
#
Expand Down
Loading

0 comments on commit c7e7776

Please sign in to comment.