docker-compose and create db in Postgres on init

If, when you start your Docker Compose, you’re getting:

PostgreSQL Database directory appears to contain a database; Skipping initialization

you need to proactively remove the volumes which were set up to store the database.

The command docker-compose down doesn’t do this automatically.

You can request removal of volumes like this:

docker-compose down --volumes

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)