Skip to content

Commit

Permalink
FEATURE: persist data in volume mounts
Browse files Browse the repository at this point in the history
Persist data in volume mounts. Allow for services to be restarted without data loss
  • Loading branch information
featheredtoast committed Nov 17, 2024
1 parent b56f188 commit 416c0d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
image: prom/prometheus
volumes:
- ./prometheus:/etc/prometheus
- prometheus:/prometheus
ports:
- "9090:9090"

Expand All @@ -46,6 +47,8 @@ services:
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${PG_PASSWORD:-secretpassword}
volumes:
- postgresql:/var/lib/postgresql/data

alertmanager-config:
build: ./alertmanager-config
Expand Down Expand Up @@ -77,8 +80,13 @@ services:
volumes:
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/dashboards:/etc/grafana/dashboards
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ./grafana/icons:/usr/share/grafana/public/img/icons/satisfactory
- grafana:/var/lib/grafana
ports:
- "3000:3000"
volumes:
grafana:
postgresql:
prometheus:
2 changes: 1 addition & 1 deletion grafana/dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ providers:
type: file
allowUiUpdates: true
options:
path: /var/lib/grafana/dashboards
path: /etc/grafana/dashboards
foldersFromFilesStructure: true

0 comments on commit 416c0d9

Please sign in to comment.