Skip to content

Postgres

docker-compose example

YAML
version: '3.7'
services:
  db:
    image: postgres:15-alpine
    restart: always
    environment:
      - POSTGRES_USER=someuser
      - POSTGRES_PASSWORD=passwordhere
#    ports:
#      - 127.0.0.1:5432:5432
    volumes:
      - ./postgres-db:/var/lib/postgresql/data
    network_mode: host
#      - durbok-net


networks:
  durbok-net:
    external: true