Postgres container crash on launch with the following error message
(project) ➜ project git:(feature/62-api-custom-image-categories) ✗ docker-compose up postgres
Starting project_postgres_1 ...
Starting project_postgres_1 ... done
Attaching to project_postgres_1
postgres_1 | FATAL: database files are incompatible with server
postgres_1 | DETAIL: The data directory was initialized by PostgreSQL version 9.5, which is not compatible with this version 9.6.3.
project_postgres_1 exited with code 1
What options do I have? II have updated image to the latest one
Portion of my docker-compose.yml
version: '2'
volumes:
ipython_history: {}
services:
postgres:
image: mdillon/postgis
ports:
- "5432:5432"
environment:
- POSTGRES_DB=p_dev
- POSTGRES_USER=p_user
- POSTGRES_PASSWORD=password
Is it possible to convert the data or the only option is to delete the container (losing all its data) and then re-create it?