kartoza / IGRAC-GGIS

https://ggis.un-igrac.org/
GNU Affero General Public License v3.0
4 stars 4 forks source link

Edit global.xml file (#643) in the Geoserver data directory #706

Open seabilwe opened 3 weeks ago

seabilwe commented 3 weeks ago

Hi @meomancer

Here are my suggestions for #643

1. Confirm configuration persistence: Verify that changes to the GeoServer configuration are correctly saved and not reset upon restart. This might involve modifying the global.xml file directly or using persistent environment variables. 2. Use external storage for configurations: Store configuration files outside of the GeoServer container or instance and link them back using symbolic links or configuration management tools. 3. Automate configuration application: Create a startup script that reapplies the desired settings every time the GeoServer restarts.

We can do the following:

  1. Update GeoServer configuration files:

    • Locate the global.xml file in the GeoServer data directory along with other configuration files like wfs and wms XML files that are available
    • Set the WFS download limit to 0 and ensure the changes are saved:
      <wfs>
      <maxFeatures>0</maxFeatures>
      </wfs>

      The above must be added to the global.xml file

  2. . Automate settings on restart:

    • Create a startup script that re-applies the desired settings.
    • Example script:
      #!/bin/bash
      # Script to set WFS limit to 0
      echo "Setting WFS download limit to 0"
      xmlstarlet ed -u "/global/wfs/downloadLimit" -v "0" /path/to/global.xml

      Hope this helps

cc @tharanathkartoza

meomancer commented 2 weeks ago

Thank you @seabilwe I will check and try it to integrate it