Database Persistence
Running a database in Docker is straightforward, but the database directory must be persisted. Otherwise a recreated container can lose its data.
Persistence does not replace backups. Back up the database using database-aware tools and test restoration regularly. A Docker volume is storage, not a backup strategy.