For local development I like to use this compose file as a template, which works well with an out of the box phoenix project.
services:
postgres:
image: postgres:17
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- type: volume
source: data
target: /var/lib/postgresql/data
ports:
- name: postgres
target: 5432
published: 5432
volumes:
data:


















