Commit 651eebd2 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Corrige edición, configs de cluster y logging

Incluye dominio permitido para realizar ediciones desde web.

Redirige la salida de logs a un fichero diferente para cada instancia.

Revisa configs: elimina sobreescritura de config de broker porque no es
necesaria y separa la de conexión al cluster en 2, una para master y
otra para nodo (porque no soporta uso de variables por ahora).
parent 0937e8f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ CLUSTER_CONFIG_DIR=${CLUSTER_CONFIG_DIR}
instanceName=${INSTANCE_STRING}
readOnly=${READONLY}
durable=${CLUSTER_DURABILITY}
brokerURL=failover:(${BROKER_URL})?initialReconnectDelay=1000&useExponentialBackOff=false
brokerURL=failover:(${BROKER_URL})
embeddedBroker=${EMBEDDED_BROKER}
connection.retry=10
toggleMaster=${TOGGLE_MASTER}
+0 −9
Original line number Diff line number Diff line
activemq.jmx.useJmx=false
activemq.jmx.port=1098
activemq.jmx.host=localhost
activemq.jmx.createConnector=false
activemq.transportConnectors.server.uri=${BROKER_URL}?maximumConnections=1000&wireFormat.maxFrameSize=104857600&jms.useAsyncSend=true&transport.daemon=true&trace=true
activemq.broker.persistent=true
activemq.broker.systemUsage.memoryUsage=128 mb
activemq.broker.systemUsage.storeUsage=1 gb
activemq.broker.systemUsage.tempUsage=128 mb
+13 −0
Original line number Diff line number Diff line
readOnly=disabled
durable=true
brokerURL=failover:(tcp://0.0.0.0:61616)
embeddedBroker=enabled
connection.retry=10
toggleMaster=true
xbeanURL=./broker.xml
embeddedBrokerProperties=embedded-broker.properties
topicName=VirtualTopic.geoserver
connection=enabled
toggleSlave=false
connection.maxwait=500
group=geoserver-cluster
+13 −0
Original line number Diff line number Diff line
readOnly=enabled
durable=true
brokerURL=failover:(tcp://geoserver-master:61616)
embeddedBroker=disabled
connection.retry=10
toggleMaster=false
xbeanURL=./broker.xml
embeddedBrokerProperties=embedded-broker.properties
topicName=VirtualTopic.geoserver
connection=enabled
toggleSlave=true
connection.maxwait=500
group=geoserver-cluster
+21 −19
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ x-geoserver-environment: &geoserver-environment
  GEOWEBCACHE_CACHE_DIR:
  FOOTPRINTS_DATA_DIR:
  EXTRA_CONFIG_DIR:
  GEOSERVER_LOG_LOCATION: 'logs/{{.Service.Name}}-{{.Task.Slot}}.log'
  HTTP_PORT: '${GEOSERVER_PORT}'
  HTTP_PROXY_NAME: '${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}'
  STABLE_EXTENSIONS:
@@ -19,9 +20,10 @@ x-geoserver-environment: &geoserver-environment
  TOMCAT_EXTRAS:
  GEOSERVER_NODE_OPTS: 'id:{{.Service.Name}}-{{.Task.Slot}};background:${GEOSERVER_LABEL_BACKGROUND};color:${GEOSERVER_LABEL_COLOR}'
  CATALINA_OPTS: '-DHTTP_PROXY_NAME=$${HTTP_PROXY_NAME}'
  DB_BACKEND: 'postgres'
  HOST: 'postgres-gwc'
  POSTGRES_PORT: '5432'
  GEOSERVER_CSRF_WHITELIST: '${GEOSERVER_SUBDOMAIN}.${PUBLIC_HOSTNAME}'
  DB_BACKEND: postgres
  HOST: postgres-gwc
  POSTGRES_PORT: 5432
  POSTGRES_DB:
  POSTGRES_USER:
  POSTGRES_PASS: '${POSTGRES_PASSWORD}'
@@ -38,14 +40,6 @@ x-geoserver-networks: &geoserver-networks
  postgres-net:
  traefik-net:

x-geoserver-configs: &geoserver-configs
  - source: web-xml-config
    target: ${EXTRA_CONFIG_DIR}/web.xml
  - source: broker-properties-config
    target: ${EXTRA_CONFIG_DIR}/embedded-broker.properties
  - source: cluster-properties-config
    target: ${EXTRA_CONFIG_DIR}/cluster.properties

x-geoserver-healthcheck: &geoserver-healthcheck
  test: curl --fail --silent http://localhost:${GEOSERVER_PORT}/geoserver
  interval: ${GEOSERVER_HEALTHCHECK_INTERVAL:-1m}
@@ -75,7 +69,11 @@ services:
      READONLY: disabled
    volumes: *geoserver-volumes
    networks: *geoserver-networks
    configs: *geoserver-configs
    configs:
      - source: web-xml-config
        target: ${EXTRA_CONFIG_DIR}/web.xml
      - source: master-cluster-properties-config
        target: ${EXTRA_CONFIG_DIR}/cluster.properties
    healthcheck: *geoserver-healthcheck
    deploy:
      << : *geoserver-deploy
@@ -101,7 +99,11 @@ services:
      READONLY: enabled
    volumes: *geoserver-volumes
    networks: *geoserver-networks
    configs: *geoserver-configs
    configs:
      - source: web-xml-config
        target: ${EXTRA_CONFIG_DIR}/web.xml
      - source: node-cluster-properties-config
        target: ${EXTRA_CONFIG_DIR}/cluster.properties
    healthcheck: *geoserver-healthcheck
    deploy:
      << : *geoserver-deploy
@@ -170,10 +172,10 @@ configs:
    name: ${WEB_XML_CONFIG_NAME:-geoserver-web-xml-config}
    file: ./config/web.xml

  broker-properties-config:
    name: ${BROKER_PROPERTIES_CONFIG_NAME:-geoserver-broker-properties-config}
    file: ./config/embedded-broker.properties
  master-cluster-properties-config:
    name: ${MASTER_CLUSTER_PROPERTIES_CONFIG_NAME:-master-geoserver-cluster-properties-config}
    file: ./config/master-cluster.properties

  cluster-properties-config:
    name: ${CLUSTER_PROPERTIES_CONFIG_NAME:-geoserver-cluster-properties-config}
    file: ./config/cluster.properties
  node-cluster-properties-config:
    name: ${NODE_CLUSTER_PROPERTIES_CONFIG_NAME:-node-geoserver-cluster-properties-config}
    file: ./config/node-cluster.properties