-
Notifications
You must be signed in to change notification settings - Fork 1
System
Armin Retterath edited this page Jul 19, 2023
·
8 revisions
In the mapbender.conf file there is an optional constant "RAMDISK". It defines the path to a fast storage which can be configured easy in debian. Under productive environments it make sense to have 6G available, cause the storage is used by the wfs-proxy to cache wfs features.
# as root
mkdir /mnt/ramdisk
mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
mkdir /mnt/ramdisk/www-data
chown -R www-data:www-data www-data/
cd {mapbender_path}/http/tmp/
ln -s /mnt/ramdisk/www-data/ ramdisk
chown -R www-data ramdisk
#mapbender.conf
define("RAMDISK", "../tmp/ramdisk");
#to make it persistent between reboots
#/etc/fstab
#tmpfs /mnt/ramdisk tmpfs defaults,size=512M 0 0
System
# as root
#things for using python scripts under www-data - apache user
sudo mkdir /var/www/.local
sudo mkdir /var/www/.cache
sudo chown www-data.www-data /var/www/.local
sudo chown www-data.www-data /var/www/.cache
sudo -H -u www-data pip3 install python-slugify
sudo -H -u www-data pip3 install shapely
sudo -H -u www-data pip3 install owslib==0.25.0
mapbender.conf
#mapbender.conf
# --------------------------------------------
# Absolute path for downloading and processing gpkg files via python lib
# --------------------------------------------
define("GPKG_ABSOLUTE_DOWNLOAD_PATH", "/home/armin/GDI-RP/devel/Geoportal/Mapbender2.8/http/tmp/");
# --------------------------------------------
# Absolute uri for accessing processed gpkg files
# --------------------------------------------
define("GPKG_ABSOLUTE_DOWNLOAD_URI", "https://www.geoportal.rlp.de/inspiredownloads/");
# --------------------------------------------
# Max area for download of gpkg in squarekilometer
# --------------------------------------------
define("GPKG_AREA_LIMIT", "100");
Python invoke script
# configure proxy in extensions/inspire-gpkg-cache/cli_invoke.py
#os.environ["HTTP_PROXY"] = "http://{proxyhost}:{proxyport}"
#os.environ["HTTPS_PROXY"] = "http://{proxyhost}:{proxyport}"
GUI element
INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('Geoportal-RLP','sdi_download_widget',2,1,'Measure','Geopackage Export','img','../img/geopackage-2.png','',85,155,24,24,200,'','','','../plugins/mb_download_widget.php','../widgets/w_digitize.js,../extensions/RaphaelJS/raphael-1.4.7.min.js','mapframe1','jq_ui_dialog,jq_ui_widget','http://www.mapbender.org/index.php/Measure');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'dialogHeight', '250', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'dialogWidth', '300', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'lineStrokeDefault', '#C9F', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'lineStrokeSnapped', '#F30', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'lineStrokeWidthDefault', '3', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'lineStrokeWidthSnapped', '5', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'measurePointDiameter', '7', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'opacity', '0.4', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'pointFillDefault', '#CCF', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'pointFillSnapped', '#F90', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'pointStrokeDefault', '#FF0000', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'pointStrokeSnapped', '#FF0000', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'pointStrokeWidthDefault', '2', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'polygonFillDefault', '#FFF', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'polygonFillSnapped', '#FC3', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'polygonStrokeWidthDefault', '1', '' ,'var');
INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('Geoportal-RLP', 'sdi_download_widget', 'polygonStrokeWidthSnapped', '5', '' ,'var');