My docker compose file has three containers, web, nginx, and postgres. Postgres looks like this:
postgres: container_name: postgres restart: always ima
Strangely enough, the solution ended up being to change
volumes: - ./postgres-data:/var/lib/postgresql
to
volumes: - ./postgres-data:/var/lib/postgresql/data