-
Notifications
You must be signed in to change notification settings - Fork 0
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 #25 from MindsHub/develop
Develop
- Loading branch information
Showing
7 changed files
with
71 additions
and
27 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
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
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,11 @@ | ||
|
||
{$COMP_PROTOCOL}://{$COMP_HOST} { | ||
|
||
reverse_proxy /grafana* grafana:3000 | ||
|
||
reverse_proxy /grafana/api/live* grafana:3000/api/live | ||
|
||
reverse_proxy insigno:8000 | ||
|
||
|
||
} |
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,22 @@ | ||
#!/bin/bash | ||
|
||
backup(){ | ||
sudo docker run -it --rm -v $1:/volume -v $(pwd):/backup --name dbstore ubuntu tar cf /backup/backup/backup-$1.tar /volume | ||
} | ||
|
||
restore(){ | ||
sudo docker run -it --rm -v $1:/volume -v $(pwd):/backup --name dbstore ubuntu tar xf /backup/backup/backup-$1.tar -C /volume | ||
} | ||
mkdir backup | ||
|
||
backup docker_db-vol | ||
backup docker_grafana-vol | ||
backup docker_media-vol | ||
backup docker_prometheus-vol | ||
backup docker_caddy-data-vol | ||
|
||
#restore docker_db-vol | ||
#restore docker_grafana-vol | ||
#restore docker_media-vol | ||
#restore docker_caddy-data-vol | ||
#restore docker_caddy-data-vol |
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 |
---|---|---|
|
@@ -3,44 +3,40 @@ services: | |
image: grafana/grafana:latest | ||
container_name: grafana | ||
restart: always | ||
ports: | ||
- '3000:3000' | ||
volumes: | ||
- grafana-vol:/var/lib/grafana | ||
- ./grafana-provisioning:/etc/grafana/provisioning | ||
- ./dashboards:/var/lib/grafana/dashboards | ||
- ./dalvany-image-panel:/var/lib/grafana/plugins/dalvany-image-panel | ||
#command: sh -c "grafana cli plugins install dalvany-image-panel" | ||
|
||
environment: | ||
GF_SECURITY_ADMIN_MAIL: "[email protected]" | ||
GF_SECURITY_ADMIN_USER: "Mindshub" | ||
GF_SECURITY_ADMIN_PASSWORD: "test" | ||
GF_SERVER_DOMAIN: insigno.mindshub.it | ||
datasource: prometheus_uid | ||
|
||
GF_SERVER_ROOT_URL: localhost:3000 | ||
#on production use this | ||
#GF_SERVER_ROOT_URL =https://insigno.mindshub.it/grafana/ | ||
GF_SERVER_SERVE_FROM_SUB_PATH: false | ||
GF_SERVER_ROOT_URL: "${COMP_PROTOCOL}://${COMP_HOST}/grafana/" | ||
GF_SERVER_SERVE_FROM_SUB_PATH: true | ||
|
||
prometheus: | ||
image: prom/prometheus:latest | ||
restart: always | ||
ports: | ||
- '9090:9090' | ||
volumes: | ||
- prometheus-vol:/prometheus | ||
- "./prometheus.yml:/etc/prometheus/prometheus.yml" | ||
environment: | ||
PROM_SCRAPE_TIME: ${PROM_SCRAPE_TIME} | ||
# | ||
command: ["--config.file=/etc/prometheus/prometheus.yml", "--storage.tsdb.path=/prometheus", "--storage.tsdb.retention.time=1y", "--storage.tsdb.retention.size=5GB", "--storage.tsdb.wal-compression", "--web.external-url=/prometheus/"] | ||
|
||
|
||
node_exporter: | ||
image: prom/node-exporter:latest | ||
restart: always | ||
ports: | ||
- 9100:9100 | ||
volumes: | ||
- /proc:/host/proc:ro | ||
- /sys:/host/sys:ro | ||
- /:/rootfs:ro | ||
#- /:/rootfs:ro | ||
command: | ||
- '--path.procfs=/host/proc' | ||
- '--path.rootfs=/rootfs' | ||
|
@@ -50,21 +46,18 @@ services: | |
postgresql_exporter: | ||
image: bitnami/postgres-exporter:latest | ||
restart: always | ||
ports: | ||
- 9187:9187 | ||
environment: | ||
- DATA_SOURCE_NAME=postgres://root:test@postgresql:5432/root?sslmode=disable | ||
- DATA_SOURCE_NAME=postgres://root:${POSTGRES_PASSWORD}@postgresql:5432/${POSTGRES_DB}?sslmode=disable | ||
|
||
postgresql: | ||
image: postgis/postgis | ||
#use tobi312/rpi-postgresql-postgis:16-3.4-alpine-arm on raspberry | ||
restart: always | ||
ports: | ||
- "5432:5432" | ||
|
||
environment: | ||
- POSTGRES_USER=root | ||
- POSTGRES_PASSWORD=test | ||
- POSTGRES_DB=root | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
- POSTGRES_DB=${POSTGRES_DB} | ||
- PGDATA=/var/lib/postgresql/data/pgdata | ||
volumes: | ||
- db-vol:/var/lib/postgresql/data | ||
|
@@ -87,13 +80,26 @@ services: | |
# source: ./templates | ||
# target: /templates | ||
- media-vol:/app/media | ||
ports: | ||
- "8000:8000" | ||
depends_on: | ||
postgresql: | ||
condition: service_healthy | ||
caddy: | ||
image: caddy:latest | ||
restart: always | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
volumes: | ||
- caddy-data:/data | ||
- ./Caddyfile:/etc/caddy/Caddyfile | ||
environment: | ||
COMP_HOST: ${COMP_HOST} | ||
COMP_PROTOCOL: ${COMP_PROTOCOL} | ||
|
||
|
||
volumes: | ||
db-vol: | ||
media-vol: | ||
prometheus-vol: | ||
grafana-vol: | ||
grafana-vol: | ||
caddy-data: |
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
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