Reputation: 1686
version: '3'
services:
db:
image: postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data
web:
build: .
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
.dockerignore
) ?Upvotes: 0
Views: 590
Reputation: 51836
The important part of the postgres container, so backing up the data folder is enough. Starting a new container is cheap in your situation, the data is what is important.
The there no obvious reason for why the volume won't work, unless you delete the postgres-data
folder accedentaly.
In summary, by inspecting the compose file, things are normal and safe.
Upvotes: 1