For posterity: the answer was that the postgres image creates a volume specifically on the sub-directory /var/lib/postgresql/data. Changing my volume to reference that directory kept the database alive between ups and downs.
foxwoodswebsites
(Foxwoodswebsites)
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Docker database disappears randomly | 5 | 637 | August 29, 2025 | |
| PostgreSQL is not keeping tables when shutdown - Docker Compose | 1 | 3495 | December 18, 2020 | |
| Database not persisting in Volume while other files are | 1 | 1854 | September 15, 2023 | |
| Postgres datafile separate from database image | 5 | 1839 | April 2, 2019 | |
| I need concrete help to create volumes in Docker Compose | 0 | 862 | June 11, 2022 |