version: "3.9"

services:
  postgres:
    image: postgres:16-alpine
    container_name: trustcontact-postgres
    restart: unless-stopped
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: trustcontact
      POSTGRES_PASSWORD: trustcontact
      POSTGRES_DB: trustcontact
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

# App env compatibility:
# DB_DRIVER=postgres
# DB_PG_DSN=postgres://trustcontact:trustcontact@localhost:5432/trustcontact?sslmode=disable
# (also supported: DB_POSTGRES_DSN)
