Skip to content

Instantly share code, notes, and snippets.

View gannebamm's full-sized avatar

Florian Hoedt gannebamm

View GitHub Profile
@gannebamm
gannebamm / main.tf
Created November 28, 2023 15:10
from a terraform workshop
#################### Provider ####################
# To use the OpenStack provider, we need to specify the provider block
terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = "1.53.0"
}
}
}
@gannebamm
gannebamm / csw.py
Created August 23, 2022 13:06
Very basic example of the CSW API usage for https://atlas.thuenen.de
from owslib.csw import CatalogueServiceWeb
from owslib.fes import PropertyIsEqualTo, PropertyIsLike, BBox
# variables
csw_endpoint = 'https://atlas.thuenen.de/catalogue/csw'
search_text = 'agraratlas'
# connect to csw
csw = CatalogueServiceWeb(csw_endpoint)
@gannebamm
gannebamm / _geonode_config.html
Created January 7, 2022 09:26
Example of mapstore2 overrides
<!-- _geonode_config.html file in geonode/templates/geonode-mapstore-client/_geonode_config.html -->
{% extends 'geonode-mapstore-client/_geonode_config.html' %}
{% block override_local_config %}
<script>
window.__GEONODE_CONFIG__.overrideLocalConfig = function(localConfig) {
// an example on how you can apply configuration to existing plugins
// example: DrawerMenu width (left panel)
var selectedPluginName = "TOC";
var pluginPageName = "map_view";
version: '3.4'
services:

  django:
    volumes:
      - .:/usr/src/geonode/
      - statics:/mnt/volumes/statics
      - geoserver-data-dir:/geoserver_data/data
 - backup-restore:/backup_restore
@gannebamm
gannebamm / Dockerfile
Created May 26, 2021 07:51
Example for plugin support for a GeoNode GeoServer
FROM tomcat:9-jre8
MAINTAINER GeoNode Development Team
#
# Set GeoServer version and data directory
#
ENV GEOSERVER_VERSION=2.18.2
# Plugins support
# Example:
# $ docker-compose -f docker-compose-production.yml build --build-arg plugins="vectortiles netcdf" geoserver
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Translators:
# Translators:
# Translators:
# Translators:
# Translators:
@gannebamm
gannebamm / document_xml_metadata_ingest.patch
Created March 3, 2021 14:57
Enable XML metadata parsing from documents for GeoNode. See https://github.com/GeoNode/geonode/issues/6876
Index: geonode/documents/views.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/geonode/documents/views.py b/geonode/documents/views.py
--- a/geonode/documents/views.py (revision a5a217bd49e7f91b69ace14a54cdb7219fa5d0dc)
+++ b/geonode/documents/views.py (revision 9e436c39e470b5a8aae6304f4a62ccbe00f4cf1c)
@@ -49,7 +49,8 @@
from geonode.base.forms import CategoryForm, TKeywordForm
@gannebamm
gannebamm / custom_translations.py
Created March 1, 2021 15:49
enable fixture texts, like iso-categories, to be fetched by makemessages command.
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2020 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@gannebamm
gannebamm / commit.diff
Created February 25, 2021 14:45
merged docker-composition from geonode-project into geonode core codebase. added changed nginx to use own certificates instead of letsenscrypt. added LDAP stubs and example production yml and .env.
diff --git a/.env b/.env
index ff474f6fab48be7c5c576135b0a99b493230433f..88dd61182fac0265d15345409b3780b1d51b9762 100644
--- a/.env
+++ b/.env
@@ -1,2 +1,203 @@
COMPOSE_PROJECT_NAME=geonode
-SET_DOCKER_ENV=production
\ No newline at end of file
+BACKUPS_VOLUME_DRIVER=local
+
@gannebamm
gannebamm / readme.md
Created January 14, 2021 13:46
Setup GeoNode with docker-compose on a Ubuntu 20.04

install tisdar based GeoNode as docker composition on Ubuntu 20.04 LTS

User

sudo adduser geonode
sudo usermod -aG sudo geonode

Docker Setup