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 1645b4f commit 2ff3f28
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 @@ -24,6 +24,7 @@ services:
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prometheus:/prometheus
ports:
- "9090:9090"

Expand All @@ -47,6 +48,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 @@ -78,8 +81,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 2ff3f28

Please sign in to comment.