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
- Is this configuration safe to work with PostgreSQL using docker ?
- Do I need any more configurations to make it safer (eg:
.dockerignore) ? - Is theire a risk that volumes work on two way binding and that may cause data loose ?