-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from georchestra/remove_datadir_submodule
Remove datadir submodule, replace by minimal copy required for Gateway tests
- Loading branch information
Showing
31 changed files
with
1,516 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
[submodule "datadir"] | ||
path = datadir | ||
url = https://github.com/georchestra/datadir.git | ||
branch = master | ||
|
||
|
Submodule datadir
deleted from
4ed87c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# geOrchestra default datadir | ||
|
||
This repository contains the default configuration files for geOrchestra modules, and can be used as a reference to build your own "geOrchestra datadir". We call this a "datadir" for the similarity with the well-known GeoServer and GeoNetwork datadirs, but this directory is not meant to host geographic data. | ||
|
||
At startup, geOrchestra applications running inside a servlet container having the extra `georchestra.datadir` parameter, will initialize themselves with the configuration contained in the directory that this parameters points to. | ||
|
||
Debian packages already come with their own version of the datadir, but the WARs we provide don't. | ||
That is the reason why this directory is provided here. | ||
|
||
|
||
## Usage | ||
|
||
In order to use this datadir: | ||
* simply clone this repository (typically in `/etc/georchestra` but it might be elsewhere) | ||
* **checkout the branch matching your geOrchestra version** (eventually prefixed with `docker-` if you use [official docker images](https://hub.docker.com/u/georchestra)) | ||
* customize the different configuration files (see below) | ||
* launch your servlet container with an extra parameter, typically `georchestra.datadir=/etc/georchestra` | ||
|
||
For instance, with tomcat, you may create a `${CATALINA_HOME}/bin/setenv.sh` file with: | ||
``` | ||
export CATALINA_OPTS="${CATALINA_OPTS} -Dgeorchestra.datadir="/etc/georchestra" | ||
``` | ||
|
||
Note that if you are developing, and running the servlet container with the Maven embedded Jetty server, by default, the datadir will be set to `/etc/georchestra/`, and you only need to launch `mvn jetty:run`. If you need to point to another location, say `/etc/anotherlocation/`, you will have to pass it to Jetty: `mvn -Dgeorchestra.datadir=/etc/anotherlocation jetty:run`. | ||
|
||
## 3-steps editing | ||
|
||
Before using this datadir, you should at least change the default FQDN (`georchestra-127-0-1-1.traefik.me`) for yours. | ||
This can be done very easily with eg: | ||
``` | ||
cd /etc/georchestra | ||
find ./ -type f -exec sed -i 's/georchestra-127-0-1-1.traefik.me/my.fqdn/' {} \; | ||
``` | ||
...where `my.fqdn` is your server's FQDN. | ||
|
||
|
||
Next thing to do, for security, is changing the password of the `geoserver_privileged_user`, that is internally used by several geOrchestra modules: | ||
``` | ||
cd /etc/georchestra | ||
find ./ -type f -exec sed -i 's/gerlsSnFd6SmM/'$(pwgen 16 1)'/' {} \; | ||
``` | ||
Remember to change it in your LDAP too ! | ||
|
||
|
||
Finally, you should head to [ReCAPTCHA](https://www.google.com/recaptcha/) and get an account for your service. | ||
Once you're done, fill in the public and private keys in the [console/console.properties](console/console.properties) file. | ||
|
||
**Restart your tomcat or jetty services when done with datadir editing**. | ||
|
||
|
||
## Notes | ||
|
||
There are plenty of other configuration options available, so feel free to browse the sub-folders of this repository and read the comments to make your mind. | ||
|
||
We do recommend that you: | ||
* change your SDI logo, with [header/logo.png](header/logo.png) | ||
* update the viewer config with [mapfishapp/js/GEOR_custom.js](mapfishapp/js/GEOR_custom.js) | ||
* translate the console ([console/templates](console/templates)) and extractor ([extractorapp/templates](extractorapp/templates)) email templates to your language, and change the default language in [default.properties](./default.properties). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Console | ||
|
||
## Instructions to create a minimalistic GeoJSON file | ||
|
||
`ogr2ogr` is a great tool, it allows at the same time to: | ||
* convert from one format (here shapefile) to geojson | ||
* filter out useless attributes (thus reducing the file size) | ||
* reproject from the source SRS to the target SRS (EPSG:4326) | ||
|
||
Exemple: | ||
``` | ||
ogr2ogr -f geojson -s_srs EPSG:3857 -t_srs EPSG:4326 -select INSEE_COM,NOM_COM_M,INSEE_DEP cities.geojson cities.shp | ||
``` | ||
|
||
The resulting geojson file is then imported into [mapshaper](https://mapshaper.org/), in order to reduce its complexity while retaining the shapes and topology. | ||
|
||
Optionally, [geojson-precision](https://github.com/jczaplew/geojson-precision) can be applied on top, to further reduce the file size: | ||
``` | ||
geojson-precision -p 4 cities.geojson final.geojson | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.