-POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}# Set environment variable POSTGRES_PASSWORD with default value 'password' (not recommended for security reasons)
volumes:
-postgres:/data/postgres# Mount named volume 'postgres' to /data/postgres in container
# ports:
# - "5432:5432" # Map host port 5432 to container port 5432
ports:
-"5432:5432"# Map host port 5432 to container port 5432
networks:
-postgres# Connect container to the 'postgres' network