Skip to content

Commit

Permalink
update permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Jan 3, 2024
1 parent bc5b2d4 commit eb575ba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 0 additions & 4 deletions build_data/broker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker useJmx="true" xmlns="http://activemq.apache.org/schema/core">

<amq:persistenceAdapter>
<kahaDB directory="${activemq.base}/kahadb" lockKeepAlivePeriod="0" />
</amq:persistenceAdapter>

<amq:persistenceAdapter>
<jdbcPersistenceAdapter dataDirectory="activemq-data"
dataSource="#postgres-ds" lockKeepAlivePeriod="0"/>
Expand Down
5 changes: 5 additions & 0 deletions clustering/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: '3.9'

volumes:
geoserver-cluster-data:
geoserver-cluster-gwc-data:
geo-db-data:

services:
Expand All @@ -22,9 +23,11 @@ services:
image: kartoza/geoserver:2.24.1
volumes:
- geoserver-cluster-data:/opt/geoserver/data_dir
- geoserver-cluster-gwc-data:/opt/geoserver/gwc
ports:
- "8081:8080"
environment:
- GEOWEBCACHE_CACHE_DIR=/opt/geoserver/gwc
- BROKER_URL=tcp://0.0.0.0:61661
- READONLY=disabled
- CLUSTER_DURABILITY=false
Expand Down Expand Up @@ -53,9 +56,11 @@ services:
image: kartoza/geoserver:2.24.1
volumes:
- geoserver-cluster-data:/opt/geoserver/data_dir
- geoserver-cluster-gwc-data:/opt/geoserver/gwc
ports:
- "8082:8080"
environment:
- GEOWEBCACHE_CACHE_DIR=/opt/geoserver/gwc
- BROKER_URL=tcp://master:61661
- READONLY=disabled
- CLUSTER_DURABILITY=false
Expand Down
2 changes: 2 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ if [[ ${RUN_AS_ROOT} =~ [Ff][Aa][Ll][Ss][Ee] ]];then
chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${directory}"
fi
done
chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${CLUSTER_CONFIG_DIR}"
chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${GEOSERVER_DATA_DIR}"/logging.xml
fi

chmod o+rw "${CERT_DIR}";gwc_file_perms ;chmod 400 "${CATALINA_HOME}"/conf/*
Expand Down
6 changes: 4 additions & 2 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function cluster_config() {
envsubst < /build_data/cluster.properties > "${CLUSTER_CONFIG_DIR}"/cluster.properties
fi
fi
chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${GEOSERVER_DATA_DIR}"/cluster
chown -R "${USER_NAME}":"${GEO_GROUP_NAME}" "${CLUSTER_CONFIG_DIR}"
}

# Helper function to setup broker config. Used with clustering configs
Expand Down Expand Up @@ -390,6 +390,7 @@ function geoserver_logging() {
if [[ ${CLUSTERING} =~ [Tt][Rr][Uu][Ee] ]]; then
export LOG_PATH=${CLUSTER_CONFIG_DIR}/geoserver.log
else
create_dir "${GEOSERVER_DATA_DIR}"/logs
export LOG_PATH=${GEOSERVER_DATA_DIR}/logs/geoserver.log
fi

Expand All @@ -401,6 +402,7 @@ function geoserver_logging() {
</logging>
" > "${GEOSERVER_DATA_DIR}"/logging.xml


if [[ ! -f ${LOG_PATH} ]];then
touch "${LOG_PATH}"
fi
Expand Down Expand Up @@ -472,7 +474,7 @@ function postgres_ready_status() {
PORT="$2"
USER="$3"
DB="$4"
until psql -h "$HOST" -p "$PORT" -U "$USER" -d "$DB" -c '\l'; do
until psql -h "$HOST" -p "$PORT" -U "$USER" -d "$DB" -c '\dt public.spatial_ref_sys' >/dev/null 2>&1; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
Expand Down
3 changes: 2 additions & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ export REQUEST_TIMEOUT PARALLEL_REQUEST GETMAP REQUEST_EXCEL SINGLE_USER GWC_REQ
# Setup control flow properties
setup_control_flow

create_dir "${GEOSERVER_DATA_DIR}"/logs

export GEOSERVER_LOG_LEVEL
geoserver_logging


if [[ ${POSTGRES_JNDI} =~ [Tt][Rr][Uu][Ee] ]];then
postgres_ssl_setup
export SSL_PARAMETERS=${PARAMS}
Expand Down

0 comments on commit eb575ba

Please sign in to comment.