docker-compose.yml
version: "3.9"
services:
postgres:
image: postgres:11.5
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=root
ports:
- 5432:5432
volumes:
- /opt/postgres/data:/var/lib/postgresql/data