version: "2"
services:
db:
image: "postgres:11-alpine"
container_name: db
restart: always
ports:
- 127.0.0.1:${POSTGRES_PORT}:5432
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
volumes:
- postgres-volume:/var/lib/postgresql/data
volumes:
postgres-volume: