-
Notifications
You must be signed in to change notification settings - Fork 87
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 #46 from jan-brinkmann/Enable-pre-and-post-commands
Enable pre and post commands
- Loading branch information
Showing
4 changed files
with
35 additions
and
0 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
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,23 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
dashboard: | ||
image: grafana/grafana:7.4.5 | ||
volumes: | ||
- grafana-data:/var/lib/grafana # This is where Grafana keeps its data | ||
|
||
backup: | ||
build: ../.. | ||
environment: | ||
# Commands that is executed before the backup is transferred: | ||
PRE_COMMAND: "ls -la /archive" | ||
# Command that is executed after the backup has been transferred: | ||
# "Delete all files in /archive that are older than seven days." | ||
POST_COMMAND: "rm $$(find /archive/* -mtime +7)" | ||
volumes: | ||
- grafana-data:/backup/grafana-data:ro # Mount the Grafana data volume (as read-only) | ||
- /home/pi/backups:/archive # Mount the directory where the backups are being stored | ||
|
||
volumes: | ||
grafana-data: |