Add hopglass-frontend role
This commit is contained in:
parent
a341ff4260
commit
bc6edb2ca3
10 changed files with 183 additions and 0 deletions
49
roles/hopglass-frontend/templates/hopglass-config.j2
Normal file
49
roles/hopglass-frontend/templates/hopglass-config.j2
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"dataPath": "https://map.hamburg.freifunk.net/hhneu/",
|
||||
"siteName": "Freifunk Hamburg",
|
||||
"mapSigmaScale": 1.1,
|
||||
"showContact": false,
|
||||
"maxAge": 30,
|
||||
"mapLayers": [
|
||||
{
|
||||
"name": "OpenStreetMap",
|
||||
"url": "https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",
|
||||
"config": {
|
||||
"maxZoom": 18,
|
||||
"attribution": "© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Satellitenbild",
|
||||
"url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
||||
"config": {
|
||||
"attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
|
||||
}
|
||||
}
|
||||
],
|
||||
"nodeInfos": [
|
||||
{
|
||||
"name": "Clientstatistik",
|
||||
"href": "https://statistik.hamburg.freifunk.net/dashboard/db/freifunk-knoteninfo-knoten-id?var-region=ffhh&var-knoten={NODE_ID}",
|
||||
"thumbnail": "https://statistik.hamburg.freifunk.net/render/dashboard-solo/db/freifunk-knoteninfo-knoten-id?panelId=1&var-region=ffhh&var-knoten={NODE_ID}&theme=light&width=530&height=332&from=now-3d",
|
||||
"caption": "Verbundene Clients in den letzten 3 Tage an Knoten {NODE_ID}"
|
||||
}
|
||||
],
|
||||
"globalInfos": [
|
||||
{
|
||||
"name": "Clientstatistik (gesamt)",
|
||||
"href": "https://statistik.hamburg.freifunk.net/dashboard/db/freifunk-ubersicht?var-region=ffhh",
|
||||
"thumbnail": "https://statistik.hamburg.freifunk.net/render/dashboard-solo/db/freifunk-ubersicht?panelId=1&var-region=ffhh&theme=light&width=530&height=332&from=now-3d",
|
||||
"caption": "Verbundene Clients in den letzten 3 Tagen"
|
||||
}
|
||||
],
|
||||
"linkInfos": [],
|
||||
"siteNames": [
|
||||
{ "site": "ffhh", "name": "Hamburg" },
|
||||
{ "site": "ffhh-nowe", "name": "Hamburg-NordWest" },
|
||||
{ "site": "ffhh-ost", "name": "Hamburg-Ost" },
|
||||
{ "site": "ffhh-sued", "name": "Hamburg-Sued" },
|
||||
{ "site": "ffhh-west", "name": "Hamburg-West" }
|
||||
],
|
||||
"hwImg": []
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
cd {{ hopglass_frontend_path }}
|
||||
npm install
|
||||
npm install grunt-cli
|
||||
node_modules/.bin/grunt
|
35
roles/hopglass-frontend/templates/nginx-site.j2
Normal file
35
roles/hopglass-frontend/templates/nginx-site.j2
Normal file
|
@ -0,0 +1,35 @@
|
|||
{% if hopglass_frontend_tls_crt is defined %}
|
||||
server {
|
||||
server_name hopglass.hamburg.freifunk.net;
|
||||
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
ssl_certificate {{ hopglass_frontend_tls_crt }};
|
||||
ssl_certificate_key {{ hopglass_frontend_tls_key }};
|
||||
|
||||
include include/no_logging.conf;
|
||||
include include/ssl_common_headers.conf;
|
||||
|
||||
gzip on;
|
||||
gzip_types application/json;
|
||||
root {{ hopglass_frontend_path }}/build;
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
server {
|
||||
server_name hopglass.hamburg.freifunk.net;
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
include include/letsencrypt.conf;
|
||||
include include/no_logging.conf;
|
||||
{% if hopglass_frontend_tls_crt is defined %}
|
||||
include include/ssl.rewrite;
|
||||
{% else %}
|
||||
|
||||
gzip on;
|
||||
gzip_types application/json;
|
||||
root {{ hopglass_frontend_path }}/build;
|
||||
{% endif %}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue