mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
Merge 19245eb1d3
into 654fa16cb2
This commit is contained in:
commit
6b7a8644dc
8 changed files with 42 additions and 29 deletions
|
@ -6,26 +6,15 @@ This is a demo [Docker Compose](https://docs.docker.com/compose/) setup for [Res
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
Build `rest-server` in Docker:
|
Bring up the Docker Compose stack (Optionally add `--build` to build image from repository instead of downloading):
|
||||||
|
|
||||||
cd ../..
|
docker compose up -d
|
||||||
make docker_build
|
|
||||||
cd -
|
|
||||||
|
|
||||||
Bring up the Docker Compose stack:
|
|
||||||
|
|
||||||
docker-compose build
|
|
||||||
docker-compose up -d
|
|
||||||
|
|
||||||
Check if everything is up and running:
|
Check if everything is up and running:
|
||||||
|
|
||||||
docker-compose ps
|
docker compose ps
|
||||||
|
|
||||||
Grafana will be running on [http://localhost:8030/](http://localhost:8030/) with username "admin" and password "admin". The first time you access it you will be asked to setup a data source. Configure it like this (make sure you name it "prometheus", as this is hardcoded in the example dashboard):
|
Grafana will be running on [http://localhost:8030/](http://localhost:8030/) with username "admin" and password "admin". When you login, you should be greeted by the dashboard, without any data.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The Rest Server dashboard can be accessed on [http://localhost:8030/dashboard/file/rest-server.json](http://localhost:8030/dashboard/file/rest-server.json).
|
|
||||||
|
|
||||||
Prometheus can be accessed on [http://localhost:8020/](http://localhost:8020/).
|
Prometheus can be accessed on [http://localhost:8020/](http://localhost:8020/).
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
|
@ -1,10 +1,9 @@
|
||||||
# Demo of rest-server with prometheus and grafana
|
# Demo of rest-server with prometheus and grafana
|
||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
restserver:
|
restserver:
|
||||||
# NOTE: You must run `make docker_build` in the repo root first
|
# NOTE: Use `docker compose up --build -d` to build the image locally
|
||||||
# If you want to run this in production, you want auth and tls!
|
# If you want to run this in production, you want auth and tls!
|
||||||
|
image: restic/rest-server:latest
|
||||||
build:
|
build:
|
||||||
context: ../..
|
context: ../..
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
@ -34,11 +33,11 @@ services:
|
||||||
image: grafana/grafana
|
image: grafana/grafana
|
||||||
volumes:
|
volumes:
|
||||||
- grafanadata:/var/lib/grafana
|
- grafanadata:/var/lib/grafana
|
||||||
- ./dashboards:/dashboards
|
- ./grafana:/etc/grafana
|
||||||
- ./grafana.ini:/etc/grafana/grafana.ini
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8030:3000"
|
- "127.0.0.1:8030:3000"
|
||||||
environment:
|
environment:
|
||||||
|
GF_SECURITY_CSRF_TRUSTED_ORIGINS: grafana.example.com # Put your serving domain here
|
||||||
GF_USERS_DEFAULT_THEME: light
|
GF_USERS_DEFAULT_THEME: light
|
||||||
# GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource
|
# GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"name": "Graph",
|
"name": "Graph",
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "datasource",
|
"type": "datasource",
|
||||||
"id": "prometheus",
|
"id": "prometheus",
|
||||||
"name": "Prometheus",
|
"name": "Prometheus",
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -223,7 +223,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -299,7 +299,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 5,
|
"id": 5,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -387,7 +387,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -463,7 +463,7 @@
|
||||||
"bars": false,
|
"bars": false,
|
||||||
"dashLength": 10,
|
"dashLength": 10,
|
||||||
"dashes": false,
|
"dashes": false,
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"fill": 1,
|
"fill": 1,
|
||||||
"id": 6,
|
"id": 6,
|
||||||
"legend": {
|
"legend": {
|
||||||
|
@ -551,7 +551,7 @@
|
||||||
{
|
{
|
||||||
"allValue": null,
|
"allValue": null,
|
||||||
"current": {},
|
"current": {},
|
||||||
"datasource": "${DS_PROMETHEUS-INFRA}",
|
"datasource": "prometheus",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"includeAll": false,
|
||||||
"label": "Instance",
|
"label": "Instance",
|
|
@ -311,3 +311,6 @@ path = /dashboards
|
||||||
# Url used to to import dashboards directly from Grafana.net
|
# Url used to to import dashboards directly from Grafana.net
|
||||||
[grafana_net]
|
[grafana_net]
|
||||||
url = https://grafana.net
|
url = https://grafana.net
|
||||||
|
|
||||||
|
[dashboards]
|
||||||
|
default_home_dashboard_path = /etc/grafana/dashboards/rest-server.json
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
providers:
|
||||||
|
- name: 'default'
|
||||||
|
orgId: 1
|
||||||
|
folder: ''
|
||||||
|
type: file
|
||||||
|
disableDeletion: false
|
||||||
|
editable: true
|
||||||
|
allowUiUpdates: true
|
||||||
|
options:
|
||||||
|
# Path to dashboard files on disk
|
||||||
|
path: /etc/grafana/dashboards
|
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
url: http://prometheus:9090
|
||||||
|
isDefault: true
|
||||||
|
uid: prometheus
|
Binary file not shown.
Before Width: | Height: | Size: 170 KiB |
Loading…
Add table
Add a link
Reference in a new issue