Skip to content

Commit 2f4e4af

Browse files
authored
- Updating docker-compose tags, images versions and .envs� - Bump Po… (GeoNode#11199)
* - Updating docker-compose tags, images versions and .envs� - Bump Postgres Image from 13 to 15 * - Fix tests * - Upgrade "letsencrypt" to "alpine:latest" base image * Bump nginx tag to 1.25.1-alpine * - Update images versions - Enable postgresql-client-15
1 parent 1ae4d12 commit 2f4e4af

File tree

9 files changed

+35
-27
lines changed

9 files changed

+35
-27
lines changed

.env

+10-8
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ NGINX_BASE_URL=
2929
POSTGRES_USER=postgres
3030
POSTGRES_PASSWORD=postgres
3131
GEONODE_DATABASE=geonode
32+
GEONODE_DATABASE_USER=geonode
3233
GEONODE_DATABASE_PASSWORD=geonode
3334
GEONODE_GEODATABASE=geonode_data
35+
GEONODE_GEODATABASE_USER=geonode_data
3436
GEONODE_GEODATABASE_PASSWORD=geonode_data
3537
GEONODE_DATABASE_SCHEMA=public
3638
GEONODE_GEODATABASE_SCHEMA=public
@@ -45,7 +47,7 @@ BROKER_URL=amqp://guest:guest@rabbitmq:5672/
4547
CELERY_BEAT_SCHEDULER=celery.beat:PersistentScheduler
4648
ASYNC_SIGNALS=True
4749

48-
SITEURL=http://localhost/
50+
SITEURL=https://localhost/
4951

5052
ALLOWED_HOSTS=['django', '*']
5153

@@ -67,8 +69,8 @@ GEONODE_LB_PORT=80
6769

6870
# IP or domain name and port where the server can be reached on HTTPS (leave HOST empty if you want to use HTTP only)
6971
# port where the server can be reached on HTTPS
70-
HTTP_HOST=localhost
71-
HTTPS_HOST=
72+
HTTP_HOST=
73+
HTTPS_HOST=localhost
7274

7375
HTTP_PORT=80
7476
HTTPS_PORT=443
@@ -78,17 +80,17 @@ HTTPS_PORT=443
7880
# disabled : we do not get a certificate at all (a placeholder certificate will be used)
7981
# staging : we get staging certificates (are invalid, but allow to test the process completely and have much higher limit rates)
8082
# production : we get a normal certificate (default)
81-
LETSENCRYPT_MODE=disabled
82-
# LETSENCRYPT_MODE=staging
83+
# LETSENCRYPT_MODE=disabled
84+
LETSENCRYPT_MODE=staging
8385
# LETSENCRYPT_MODE=production
8486

8587
RESOLVER=127.0.0.11
8688

8789
# #################
8890
# geoserver
8991
# #################
90-
GEOSERVER_WEB_UI_LOCATION=http://localhost/geoserver/
91-
GEOSERVER_PUBLIC_LOCATION=http://localhost/geoserver/
92+
GEOSERVER_WEB_UI_LOCATION=https://localhost/geoserver/
93+
GEOSERVER_PUBLIC_LOCATION=https://localhost/geoserver/
9294
GEOSERVER_LOCATION=http://geoserver:8080/geoserver/
9395
GEOSERVER_ADMIN_USER=admin
9496
GEOSERVER_ADMIN_PASSWORD=geoserver
@@ -186,7 +188,7 @@ BING_API_KEY=
186188
GOOGLE_API_KEY=
187189

188190
# Monitoring
189-
MONITORING_ENABLED=True
191+
MONITORING_ENABLED=False
190192
MONITORING_DATA_TTL=365
191193
USER_ANALYTICS_ENABLED=True
192194
USER_ANALYTICS_GZIP=True

.env_dev

+2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ NGINX_BASE_URL=
2929
POSTGRES_USER=postgres
3030
POSTGRES_PASSWORD=postgres
3131
GEONODE_DATABASE=geonode
32+
GEONODE_DATABASE_USER=geonode
3233
GEONODE_DATABASE_PASSWORD=geonode
3334
GEONODE_GEODATABASE=geonode_data
35+
GEONODE_GEODATABASE_USER=geonode
3436
GEONODE_GEODATABASE_PASSWORD=geonode
3537
GEONODE_DATABASE_SCHEMA=public
3638
GEONODE_GEODATABASE_SCHEMA=public

.env_local

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ NGINX_BASE_URL=
2929
POSTGRES_USER=postgres
3030
POSTGRES_PASSWORD=postgres
3131
GEONODE_DATABASE=geonode
32+
GEONODE_DATABASE_USER=geonode
3233
GEONODE_DATABASE_PASSWORD=geonode
3334
GEONODE_GEODATABASE=geonode_data
35+
GEONODE_GEODATABASE_USER=geonode
3436
GEONODE_GEODATABASE_PASSWORD=geonode
3537
GEONODE_DATABASE_SCHEMA=public
3638
GEONODE_GEODATABASE_SCHEMA=public
@@ -45,7 +47,7 @@ BROKER_URL=amqp://admin:admin@localhost:5672//
4547
CELERY_BEAT_SCHEDULER=celery.beat:PersistentScheduler
4648
ASYNC_SIGNALS=False
4749

48-
SITEURL=http://localhost/
50+
SITEURL=http://localhost:8000/
4951

5052
ALLOWED_HOSTS="['django', '*']"
5153

.env_test

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ NGINX_BASE_URL=
2929
POSTGRES_USER=postgres
3030
POSTGRES_PASSWORD=postgres
3131
GEONODE_DATABASE=geonode
32+
GEONODE_DATABASE_USER=geonode
3233
GEONODE_DATABASE_PASSWORD=geonode
3334
GEONODE_GEODATABASE=geonode_data
35+
GEONODE_GEODATABASE_USER=geonode_data
3436
GEONODE_GEODATABASE_PASSWORD=geonode_data
3537
GEONODE_DATABASE_SCHEMA=public
3638
GEONODE_GEODATABASE_SCHEMA=public
@@ -195,7 +197,7 @@ BING_API_KEY=
195197
GOOGLE_API_KEY=
196198

197199
# Monitoring
198-
MONITORING_ENABLED=True
200+
MONITORING_ENABLED=False
199201
MONITORING_DATA_TTL=365
200202
USER_ANALYTICS_ENABLED=True
201203
USER_ANALYTICS_GZIP=True

docker-compose.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: '3.9'
44
x-common-django:
55
&default-common-django
66
image: geonode/geonode:latest-ubuntu-22.10
7-
restart: on-failure
7+
restart: unless-stopped
88
env_file:
99
- .env
1010
volumes:
@@ -50,7 +50,7 @@ services:
5050

5151
# Nginx is serving django static and media files and proxies to django and geonode
5252
geonode:
53-
image: geonode/nginx:4.0
53+
image: geonode/nginx:4.1.0
5454
build: ./scripts/docker/nginx/
5555
container_name: nginx4${COMPOSE_PROJECT_NAME}
5656
environment:
@@ -67,11 +67,11 @@ services:
6767
- nginx-confd:/etc/nginx
6868
- nginx-certificates:/geonode-certificates
6969
- statics:/mnt/volumes/statics
70-
restart: on-failure
70+
restart: unless-stopped
7171

7272
# Gets and installs letsencrypt certificates
7373
letsencrypt:
74-
image: geonode/letsencrypt:4.0
74+
image: geonode/letsencrypt:4.1.0
7575
build: ./scripts/docker/letsencrypt/
7676
container_name: letsencrypt4${COMPOSE_PROJECT_NAME}
7777
environment:
@@ -81,7 +81,7 @@ services:
8181
- LETSENCRYPT_MODE=${LETSENCRYPT_MODE}
8282
volumes:
8383
- nginx-certificates:/geonode-certificates
84-
restart: on-failure
84+
restart: unless-stopped
8585

8686
# Geoserver backend
8787
geoserver:
@@ -101,7 +101,7 @@ services:
101101
- backup-restore:/backup_restore
102102
- data:/data
103103
- tmp:/tmp
104-
restart: on-failure
104+
restart: unless-stopped
105105
depends_on:
106106
db:
107107
condition: service_healthy
@@ -114,22 +114,22 @@ services:
114114
entrypoint: sleep infinity
115115
volumes:
116116
- geoserver-data-dir:/geoserver_data/data
117-
restart: on-failure
117+
restart: unless-stopped
118118
healthcheck:
119119
test: "ls -A '/geoserver_data/data' | wc -l"
120120

121121
# PostGIS database.
122122
db:
123-
# use geonode official postgis 13 image
124-
image: geonode/postgis:13
123+
# use geonode official postgis 15 image
124+
image: geonode/postgis:15
125125
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}"
126126
container_name: db4${COMPOSE_PROJECT_NAME}
127127
env_file:
128128
- .env
129129
volumes:
130130
- dbdata:/var/lib/postgresql/data
131131
- dbbackups:/pg_backups
132-
restart: on-failure
132+
restart: unless-stopped
133133
healthcheck:
134134
test: "pg_isready -d postgres -U postgres"
135135
# uncomment to enable remote connections to postgres
@@ -138,11 +138,11 @@ services:
138138

139139
# Vanilla RabbitMQ service. This is needed by celery
140140
rabbitmq:
141-
image: rabbitmq:3.7-alpine
141+
image: rabbitmq:3-alpine
142142
container_name: rabbitmq4${COMPOSE_PROJECT_NAME}
143143
volumes:
144144
- rabbitmq:/var/lib/rabbitmq
145-
restart: on-failure
145+
restart: unless-stopped
146146

147147
volumes:
148148
statics:

scripts/docker/base/ubuntu/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:22.10
22

33
RUN mkdir -p /usr/src/geonode
44

5-
## Enable postgresql-client-13
5+
## Enable postgresql-client-15
66
RUN apt-get update -y && apt-get install curl wget unzip gnupg2 -y
77
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
88
# will install python3.10
@@ -17,7 +17,7 @@ RUN apt-get install -y \
1717

1818
RUN apt-get update -y && apt-get install -y --no-install-recommends \
1919
gcc vim zip gettext geoip-bin cron \
20-
postgresql-client-13 \
20+
postgresql-client-15 \
2121
python3-all-dev python3-dev \
2222
python3-gdal python3-psycopg2 python3-ldap \
2323
python3-pip python3-pil python3-lxml \

scripts/docker/letsencrypt/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.16
1+
FROM alpine:latest
22

33
RUN apk add --no-cache certbot
44

scripts/docker/nginx/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nginx:1-alpine
1+
FROM nginx:1.25.1-alpine
22

33
RUN apk add --no-cache openssl inotify-tools
44

start_django_async.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
export RESOURCE_PUBLISHING=True
55
export ADMIN_MODERATE_UPLOADS=True
66
export NOTIFICATION_ENABLED=True
7-
export MONITORING_ENABLED=True
7+
export MONITORING_ENABLED=False
88
export EMAIL_ENABLED=True
99
export BROKER_URL=amqp://guest:guest@localhost:5672/
1010
export ASYNC_SIGNALS=True

0 commit comments

Comments
 (0)