Skip to content

Commit

Permalink
Add example compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik Oenings committed Jun 18, 2024
1 parent 8eaa716 commit 2afea25
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ cd masterportal-cloud
docker build -t masterportal .
```

A portal is not provided with the container.
It needs to be mounted as a volume inside `/srv/www` (see below).

The web server is exposed at port 80 in the container.

## Using docker compose
`docker compose` allows to pre-configure the environment of the docker container.
This repository provides an example configuration that loads the demo portal from the `portal` folder and exposes the Masterportal at port 8080 on your machine.

Usage:
```
docker compose build
docker compose up -d
```

## Future plans

- Provide a Helm chart for Kubernetes deployments
7 changes: 7 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
masterportal:
build: .
volumes:
- ./portal:/srv/www/portal:ro
ports:
- 8080:80
29 changes: 29 additions & 0 deletions portal/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const Config = {
alerting: {
fetchBroadcastUrl: './resources/newsFeedPortalAlerts.json',
},
namedProjections: [
[ 'EPSG:25832', '+title=ETRS89/UTM 32N +proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs' ],
],
layerConf: './resources/services-internet.json',
restConf: './resources/rest-services-internet.json',
styleConf: './resources/style_v3.json',
wfsImgPath: './resources/img/',
portalLanguage: {
enabled: true,
debug: false,
languages: {
de: 'Deutsch',
en: 'English',
es: 'Español',
it: 'Italiano',
platt: 'Platt',
pt: 'Português',
ru: 'Русский',
tr: 'Türkçe',
ua: 'Українська',
},
fallbackLanguage: 'de',
changeLanguageOnStartWhen: [ 'querystring', 'localStorage', 'htmlTag' ],
},
}
98 changes: 98 additions & 0 deletions portal/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"portalConfig": {
"map": {
"controls": {
"zoom": true,
"orientation": {
"zoomMode": "once"
}
},
"mapView": {
"backgroundImage": "./resources/img/backgroundCanvas.jpeg",
"startCenter": [
561210,
5932600
],
"extent": [
510000.0,
5850000.0,
625000.4,
6000000.0
],
"startZoomLevel": 1
}
},
"portalFooter": {
"urls": [
{
"bezeichnung": "common:modules.portalFooter.designation",
"url": "https://www.dataport.de/",
"alias": "Dataport AöR",
"alias_mobil": "Dataport"
}
]
},
"tree": {
"addLayerButton": {
"active": false
},
"highlightedFeatures": {
"active": true
}
},
"mainMenu": {
"expanded": true,
"title": {
"text": "Cloud",
"logo": "./resources/img/mp_logo.png",
"link": "https://masterportal.org",
"toolTip": "Masterportal"
},
"sections": [
[
{
"type": "fileImport"
},
{
"type": "openConfig"
},
{
"type": "language"
}
]
]
},
"secondaryMenu": {
"expanded": false,
"sections": [
[
{
"type": "legend"
},
{
"type": "scaleSwitcher"
},
{
"type": "shareView"
},
{
"type": "measure"
}
]
]
}
},
"layerConfig": {
"baselayer": {
"elements": [
{
"id": "basemap_color",
"visibility": true
}
]
},
"subjectlayer": {
"elements": []
}
}
}
16 changes: 16 additions & 0 deletions portal/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<title>Masterportal-Cloud</title>
<link rel="stylesheet" href="/mastercode/docker/css/masterportal.css" />
</head>
<body>
<div id="masterportal-root"></div>
<script src="/mastercode/docker/js/masterportal.js"></script>
</body>
</html>
Binary file added portal/resources/img/backgroundCanvas.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions portal/resources/rest-services-internet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
46 changes: 46 additions & 0 deletions portal/resources/services-internet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"id": "basemap_color",
"name": "basemap.de (Farbe)",
"url": "https://sgx.geodatenzentrum.de/wms_basemapde",
"typ": "WMS",
"layers": "de_basemapde_web_raster_farbe",
"format": "image/png",
"version": "1.3.0",
"singleTile": false,
"transparent": true,
"transparency": 0,
"urlIsVisible": true,
"tilesize": 512,
"gutter": 0,
"minScale": "0",
"maxScale": "2500000",
"gfiAttributes": "showAll",
"gfiTheme": "default",
"layerAttribution": "nicht vorhanden",
"legendURL": "",
"cache": false,
"featureCount": 5,
"datasets": [
{
"md_id": "69264016-D304-4DD6-BCEF-509C1ED19F14",
"csw_url": "https://mis.bkg.bund.de/csw",
"show_doc_url": "https://mis.bkg.bund.de/trefferanzeige?docuuid=",
"rs_id": "https://registry.gdi-de.org/id/de.bund.bkg.csw/055981a6-c6c6-4ea9-a3a3-755999526d2e",
"md_name": "basemap.de Web Raster Farbe",
"bbox": "280371.07942808943,5235855.820200145,919932.927285466,6120635.987098161",
"kategorie_opendata": ["Sonstiges"],
"kategorie_inspire": [
"Verwaltungseinheiten",
"Adressen",
"Bodenbedeckung",
"Bodennutzung",
"Gewässernetz",
"Gebäude"
],
"kategorie_organisation": "Arbeitsgemeinschaft der Vermessungsverwaltungen der Länder der Bundesrepublik Deutschland (AdV)"
}
],
"notSupportedIn3D": false
}
]
1 change: 1 addition & 0 deletions portal/resources/style_v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]

0 comments on commit 2afea25

Please sign in to comment.