Closed tilacog closed 1 year ago
Is there a way to force data deletion without asking users to provide that flag? I feel like it's too easy to forget, and then waste time figuring out why docker compose up
is not working...
I don't think there is a native way to cleanup volumes on docker compose (other than the two methods disclosed above), but we could wrap the postgres
invocation in a startup/entrypoint script that calls dropdb
before the service starts.
Found a way to always remove the database before starting postgres in 3956c49.
postgres-cleanup
job:For automatic volume disposal, we need to either invoke
docker compose up
with the--renew-anon-volumes
flag:Or invoke 'docker compose down
with the
--volumes` flag:healthchecks