Skip to content

Commit

Permalink
Upgrade to master project
Browse files Browse the repository at this point in the history
  • Loading branch information
giohappy committed Jan 11, 2024
1 parent 349fb25 commit 890b4b9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ DOCKER_ENV=production
DOCKER_API_VERSION="1.24"
BACKUPS_VOLUME_DRIVER=local

GEONODE_BASE_IMAGE_VERSION=latest
NGINX_BASE_IMAGE_VERSION=latest
LETSENCRYPT_BASE_IMAGE_VERSION=latest
GEOSERVER_BASE_IMAGE_VERSION=latest
GEOSERVER_DATA_BASE_IMAGE_VERSION=latest
POSTGRES_BASE_IMAGE_VERSION=latest
GEONODE_BASE_IMAGE_VERSION=master
NGINX_BASE_IMAGE_VERSION=1.25.3-latest
LETSENCRYPT_BASE_IMAGE_VERSION=2.6.0-latest
GEOSERVER_BASE_IMAGE_VERSION=2.23.3-latest
GEOSERVER_DATA_BASE_IMAGE_VERSION=2.23.3-latest
POSTGRES_BASE_IMAGE_VERSION=15.3-latest

C_FORCE_ROOT=1
FORCE_REINIT=false
Expand Down Expand Up @@ -108,7 +108,7 @@ OGC_REQUEST_POOL_CONNECTIONS=10
# Java Options & Memory
ENABLE_JSONP=true
outFormat=text/javascript
GEOSERVER_JAVA_OPTS='-Djava.awt.headless=true -Xms4G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=false -DGS-SHAPEFILE-CHARSET=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL={geoserver_ui}/geoserver/pdf -DALLOW_ENV_PARAMETRIZATION=true -Xbootclasspath/a:/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/marlin-0.9.3-Unsafe.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine'
GEOSERVER_JAVA_OPTS=-Djava.awt.headless=true -Xms4G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=false -DGS-SHAPEFILE-CHARSET=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL={siteurl}/geoserver/pdf -DALLOW_ENV_PARAMETRIZATION=true -Xbootclasspath/a:/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/marlin-0.9.3-Unsafe.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine

# #################
# Security
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GeoNode template project. Generates a django project with GeoNode support.
```bash
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
django-admin startproject --template=https://github.com/GeoNode/geonode-project/archive/refs/heads/$GN_VERSION.zip -e py,sh,md,rst,json,yml,ini,env,sample,properties -n monitoring-cron -n Dockerfile project_name ~/project_name
```

```bash
Expand Down
2 changes: 1 addition & 1 deletion create-envfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def _get_vals_to_replace(args):
prog="ENV file builder",
description="Tool for generate environment file automatically. The information can be passed or via CLI or via JSON file ( --file /path/env.json)",
usage="python create-envfile.py localhost -f /path/to/json/file.json",
allow_abbrev=False,
allow_abbrev=False
)
parser.add_argument(
"--noinput",
Expand Down
9 changes: 6 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.9'
# Common Django template for GeoNode and Celery services below
x-common-django:
&default-common-django
image: ${COMPOSE_PROJECT_NAME}_django:latest
image: ${COMPOSE_PROJECT_NAME}/geonode:${GEONODE_BASE_IMAGE_VERSION}
restart: unless-stopped
env_file:
- .env
Expand Down Expand Up @@ -41,7 +41,6 @@ services:
# Celery worker that executes celery tasks created by Django.
celery:
<< : *default-common-django
image: ${COMPOSE_PROJECT_NAME}_django:latest
container_name: celery4${COMPOSE_PROJECT_NAME}
depends_on:
django:
Expand All @@ -53,6 +52,7 @@ services:

# Nginx is serving django static and media files and proxies to django and geonode
geonode:
image: ${COMPOSE_PROJECT_NAME}/nginx:${NGINX_BASE_IMAGE_VERSION}
build:
context: ./docker/nginx
dockerfile: Dockerfile
Expand Down Expand Up @@ -87,6 +87,7 @@ services:

# Gets and installs letsencrypt certificates
letsencrypt:
image: ${COMPOSE_PROJECT_NAME}/letsencrypt:${LETSENCRYPT_BASE_IMAGE_VERSION}
build:
context: ./docker/letsencrypt
dockerfile: Dockerfile
Expand All @@ -101,6 +102,7 @@ services:

# Geoserver backend
geoserver:
image: ${COMPOSE_PROJECT_NAME}/geoserver:${GEOSERVER_BASE_IMAGE_VERSION}
build:
context: ./docker/geoserver
dockerfile: Dockerfile
Expand Down Expand Up @@ -131,6 +133,7 @@ services:
condition: service_healthy

data-dir-conf:
image: ${COMPOSE_PROJECT_NAME}/geoserver_data:${GEOSERVER_DATA_BASE_IMAGE_VERSION}
build:
context: ./docker/geoserver_data
dockerfile: Dockerfile
Expand All @@ -146,7 +149,7 @@ services:

# PostGIS database.
db:
# use geonode official postgis 15 image
image: ${COMPOSE_PROJECT_NAME}/postgis:${POSTGRES_BASE_IMAGE_VERSION}
build:
context: ./docker/postgresql
dockerfile: Dockerfile
Expand Down
1 change: 0 additions & 1 deletion src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ else
invoke prepare

if [ ${FORCE_REINIT} = "true" ] || [ ${FORCE_REINIT} = "True" ] || [ ! -e "/mnt/volumes/statics/geonode_init.lock" ]; then
invoke updategeoip
invoke fixtures
invoke monitoringfixture
invoke initialized
Expand Down
2 changes: 0 additions & 2 deletions src/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,13 @@ def _docker_host_ip():
)
return ip_list[0]


def _is_valid_ip(ip):
try:
ipaddress.IPv4Address(ip)
return True
except Exception as e:
return False


def _container_exposed_port(component, instname):
port = "80"
try:
Expand Down

0 comments on commit 890b4b9

Please sign in to comment.