Compare commits
3 commits
b528e9b94b
...
b27f07a867
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b27f07a867 | ||
![]() |
824b10546d | ||
![]() |
33d973927c |
3 changed files with 44 additions and 5 deletions
|
@ -45,7 +45,7 @@ fi
|
||||||
if [[ "$?" == "0" ]]
|
if [[ "$?" == "0" ]]
|
||||||
then
|
then
|
||||||
zfs bookmark "$source_dataset@$new_bookmark" "$source_dataset#$new_bookmark"
|
zfs bookmark "$source_dataset@$new_bookmark" "$source_dataset#$new_bookmark"
|
||||||
#zfs destroy "$source_dataset@$new_bookmark" # keep snapshots?
|
zfs destroy "$source_dataset@$new_bookmark" # keep snapshots?
|
||||||
echo "SUCCESS"
|
echo "SUCCESS"
|
||||||
else
|
else
|
||||||
zfs destroy "$source_dataset@$new_bookmark"
|
zfs destroy "$source_dataset@$new_bookmark"
|
||||||
|
|
|
@ -55,6 +55,20 @@ defaults = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@metadata_reactor.provides(
|
||||||
|
'grafana/config/server/domain',
|
||||||
|
)
|
||||||
|
def domain(metadata):
|
||||||
|
return {
|
||||||
|
'grafana': {
|
||||||
|
'config': {
|
||||||
|
'server': {
|
||||||
|
'domain': metadata.get('grafana/hostname'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@metadata_reactor.provides(
|
@metadata_reactor.provides(
|
||||||
'grafana/datasources',
|
'grafana/datasources',
|
||||||
)
|
)
|
||||||
|
@ -115,10 +129,7 @@ def nginx(metadata):
|
||||||
'nginx': {
|
'nginx': {
|
||||||
'vhosts': {
|
'vhosts': {
|
||||||
metadata.get('grafana/hostname'): {
|
metadata.get('grafana/hostname'): {
|
||||||
'content': 'nginx/proxy_pass.conf',
|
'content': 'grafana/vhost.conf',
|
||||||
'context': {
|
|
||||||
'target': 'http://127.0.0.1:8300',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
28
data/grafana/vhost.conf
Normal file
28
data/grafana/vhost.conf
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
server_name ${server_name};
|
||||||
|
|
||||||
|
ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem;
|
||||||
|
ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_pass http://127.0.0.1:8300/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Proxy Grafana Live WebSocket connections.
|
||||||
|
location /api/live {
|
||||||
|
rewrite ^/(.*) /$1 break;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_pass http://127.0.0.1:8300/;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue