Skip to content

Commit

Permalink
- Align to GeoNode master (4.2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jul 27, 2023
1 parent d341641 commit 9b42323
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 67 deletions.
10 changes: 9 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ OGC_REQUEST_POOL_CONNECTIONS=10
# Java Options & Memory
ENABLE_JSONP=true
outFormat=text/javascript
GEOSERVER_JAVA_OPTS=-Djava.awt.headless=true -Xms2G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:+UseConcMarkSweepGC -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={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

# #################
# Security
Expand Down Expand Up @@ -158,6 +158,8 @@ ACCOUNT_EMAIL_REQUIRED=True
ACCOUNT_APPROVAL_REQUIRED=False
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_VERIFICATION=none
ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
ACCOUNT_AUTHENTICATION_METHOD=username_email
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True

Expand Down Expand Up @@ -257,3 +259,9 @@ RESTART_POLICY_WINDOW=120s

DEFAULT_MAX_UPLOAD_SIZE=5368709120
DEFAULT_MAX_PARALLEL_UPLOADS_PER_USER=5

# Azure AD
MICROSOFT_TENANT_ID=
AZURE_CLIENT_ID=
AZURE_SECRET_KEY=
AZURE_KEY=
2 changes: 2 additions & 0 deletions .override_dev_env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export ACCOUNT_EMAIL_REQUIRED=True
export ACCOUNT_APPROVAL_REQUIRED=False
export ACCOUNT_CONFIRM_EMAIL_ON_GET=False
export ACCOUNT_EMAIL_VERIFICATION=none
export ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
export ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
export ACCOUNT_AUTHENTICATION_METHOD=username_email

export OAUTH2_API_KEY=
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN pip install --upgrade --no-cache-dir --src /usr/src -r requirements.txt
RUN pip install --upgrade -e .

# Cleanup apt update lists
RUN apt-get autoremove --purge
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

# Export ports
Expand Down
20 changes: 1 addition & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
dockerfile: Dockerfile
container_name: django4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://127.0.0.1:8001/"
test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://127.0.0.1:8000/"
start_period: 60s
interval: 60s
timeout: 10s
Expand Down Expand Up @@ -150,27 +150,9 @@ services:
volumes:
- rabbitmq:/var/lib/rabbitmq
restart: unless-stopped

jenkins:
image: jenkins/jenkins:2.164-jdk11
container_name: jenkins4${COMPOSE_PROJECT_NAME}
user: jenkins
ports:
- '${JENKINS_HTTP_PORT}:${JENKINS_HTTP_PORT}'
- '${JENKINS_HTTPS_PORT}:${JENKINS_HTTPS_PORT}'
- '50000:50000'
# network_mode: "host"
volumes:
- jenkins_data:/var/jenkins_home
- backup-restore:/backup_restore
- data:/data
environment:
- 'JENKINS_OPTS=--httpPort=${JENKINS_HTTP_PORT} --httpsPort=${JENKINS_HTTPS_PORT} --prefix=/jenkins'
restart: on-failure

volumes:
jenkins_data:
driver: local
statics:
name: ${COMPOSE_PROJECT_NAME}-statics
nginx-confd:
Expand Down
5 changes: 4 additions & 1 deletion docker/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM nginx:1.25.1-alpine

RUN apk add --no-cache openssl inotify-tools
RUN apk add --no-cache openssl inotify-tools vim

WORKDIR /etc/nginx/

RUN mkdir -p /etc/nginx/html
RUN touch /etc/nginx/html/index.html

ADD nginx.conf.envsubst nginx.https.available.conf.envsubst ./
ADD geonode.conf.envsubst ./sites-enabled/

Expand Down
2 changes: 1 addition & 1 deletion docker/nginx/nginx.conf.envsubst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ http {
# TODO : do not use unencrypted connection even on LAN, but is it possible to have browser not complaining about unknown authority ?
server {
listen 80;
server_name $HTTP_HOST 127.0.0.1 geonode;
server_name $HTTP_HOST 127.0.0.1;

include sites-enabled/*.conf;
}
Expand Down
4 changes: 2 additions & 2 deletions src/dev_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
GEOSERVER_URL: "https://artifacts.geonode.org/geoserver/2.20.6/geoserver.war"
DATA_DIR_URL: "https://artifacts.geonode.org/geoserver/2.20.6/geonode-geoserver-ext-web-app-data.zip"
GEOSERVER_URL: "https://artifacts.geonode.org/geoserver/2.23.0/geoserver.war"
DATA_DIR_URL: "https://artifacts.geonode.org/geoserver/2.23.0/geonode-geoserver-ext-web-app-data.zip"
JETTY_RUNNER_URL: "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-runner/9.4.31.v20200723/jetty-runner-9.4.31.v20200723.jar"
WINDOWS:
py2exe: "http://downloads.sourceforge.net/project/py2exe/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe"
Expand Down
53 changes: 14 additions & 39 deletions src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,56 +41,31 @@ echo MONITORING_HOST_NAME=$MONITORING_HOST_NAME
echo MONITORING_SERVICE_NAME=$MONITORING_SERVICE_NAME
echo MONITORING_DATA_TTL=$MONITORING_DATA_TTL

invoke waitfordbs
# invoke waitfordbs

cmd="$@"

echo DOCKER_ENV=$DOCKER_ENV

if [ -z ${DOCKER_ENV} ] || [ ${DOCKER_ENV} = "development" ]
if [ ${IS_CELERY} = "true" ] || [ ${IS_CELERY} = "True" ]
then
echo "Executing Celery server $cmd for Production"
else

invoke migrations
invoke prepare
invoke fixtures

if [ ${IS_CELERY} = "true" ] || [ ${IS_CELERY} = "True" ]
then

echo "Executing Celery server $cmd for Development"

else

invoke devrequirements
invoke statics

echo "Executing standard Django server $cmd for Development"

if [ ${FORCE_REINIT} = "true" ] || [ ${FORCE_REINIT} = "True" ] || [ ! -e "/mnt/volumes/statics/geonode_init.lock" ]; then
invoke updategeoip
invoke fixtures
invoke monitoringfixture
invoke initialized
invoke updateadmin
fi

else
if [ ${IS_CELERY} = "true" ] || [ ${IS_CELERY} = "True" ]
then
echo "Executing Celery server $cmd for Production"
else

invoke migrations
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
invoke updateadmin
fi
invoke statics
invoke waitforgeoserver
invoke geoserverfixture

invoke statics
invoke waitforgeoserver
invoke geoserverfixture

echo "Executing UWSGI server $cmd for Production"
fi
echo "Executing UWSGI server $cmd for Production"
fi

echo "-----------------------------------------------------"
Expand Down
5 changes: 3 additions & 2 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
git+https://github.com/GeoNode/geonode-mapstore-client.git@master#egg=django_geonode_mapstore_client
git+https://github.com/GeoNode/geonode.git@master#egg=GeoNode
-e git+https://github.com/GeoNode/geonode-mapstore-client.git@master#egg=django_geonode_mapstore_client
-e git+https://github.com/GeoNode/geonode-importer.git@master#egg=geonode-importer
-e git+https://github.com/GeoNode/geonode.git@master#egg=GeoNode
4 changes: 2 additions & 2 deletions src/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[uwsgi]
uwsgi-socket = 0.0.0.0:8000
http-socket = 0.0.0.0:8001
# uwsgi-socket = 0.0.0.0:8000
http-socket = 0.0.0.0:8000
logto = /var/log/geonode.log
# pidfile = /tmp/geonode.pid

Expand Down

0 comments on commit 9b42323

Please sign in to comment.