fix: persist db volume

Making the db use an anon volume will cause data loss - all persisted
data (db, storage, etc.) should be preserved even if the user does
`docker system prune`.

Instead use
[Compose overrides](https://docs.docker.com/compose/extends/#adding-and-overriding-configuration)
for dev mode.
This commit is contained in:
Bobbie Soedirgo committed 2021-12-16 15:33:46 +08:00
1 parent d208857f3d
commit f1d8b10dd0
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -13,4 +13,8 @@ services:
- 5555:8080
db:
volumes:
- /var/lib/postgresql/data
- ./dev/data.sql:/docker-entrypoint-initdb.d/data.sql
storage:
volumes:
- /var/lib/storage
+1 -1
View File
@@ -154,5 +154,5 @@ services:
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- /var/lib/postgresql/data
- ./volumes/db/data:/var/lib/postgresql/data
- ./volumes/db/init:/docker-entrypoint-initdb.d