Add docker/volumes/README.md

This commit is contained in:
2026-06-15 12:07:32 +00:00
parent e842283e95
commit 5bfb17334f
+80
View File
@@ -0,0 +1,80 @@
# Docker Volumes
## Purpose
Docker volumes store persistent data outside of containers.
Containers can be deleted and recreated without losing data stored in volumes.
## Why Volumes Matter
A container is temporary.
A volume contains the important data.
Example:
* Delete container = service disappears
* Keep volume = data remains
* Recreate container = service returns with data intact
## Current Volumes
| Volume | Purpose |
| -------------- | --------------------------------- |
| uptime-kuma | Monitoring data |
| portainer_data | Portainer configuration |
| gitea_data | Git repositories, users, settings |
## Commands
List volumes:
```bash
docker volume ls
```
Inspect a volume:
```bash
docker volume inspect VOLUME_NAME
```
Example:
```bash
docker volume inspect uptime-kuma
```
## Real World Example
Uptime Kuma stores:
* Monitors
* Notifications
* Settings
* Historical uptime data
inside its Docker volume.
If the container crashes, the data remains.
## Lessons Learned
* Containers are disposable.
* Volumes contain important data.
* Backups should focus on volumes.
* Persistent services should always use volumes.
* Volumes make upgrades and migrations easier.
## Backup Strategy
Important volumes to back up:
* gitea_data
* uptime-kuma
* portainer_data
## Date Created
June 15, 2026