name: 'pqgo'

services:
  pgbouncer:
    profiles: ['pgbouncer']
    image:    'cleanstart/pgbouncer:1.24'
    ports:    ['127.0.0.1:6432:6432']
    command:  ['/init/pgbouncer.ini']
    volumes:  ['./testdata/init:/init']
    environment:
      'PGBOUNCER_DATABASE': 'pqgo'

  pgpool:
    profiles:   ['pgpool']
    image:      'pgpool/pgpool:4.4.3'
    ports:      ['127.0.0.1:7432:7432']
    volumes:    ['./testdata/init:/init']
    entrypoint: '/init/entry-pgpool.sh'
    environment:
      'PGPOOL_PARAMS_PORT':              '7432'
      'PGPOOL_PARAMS_BACKEND_HOSTNAME0': 'pg18'

  pg18:
    image:      'postgres:18'
    ports:      ['127.0.0.1:5432:5432']
    entrypoint: '/init/entry.sh'
    volumes:    ['./testdata/init:/init']
    shm_size:   '128mb'
    environment:
      'POSTGRES_DATABASE': 'pqgo'
      'POSTGRES_USER':     'pqgo'
      'POSTGRES_PASSWORD': 'unused'
  pg17:
    profiles:   ['pg17']
    image:      'postgres:17'
    ports:      ['127.0.0.1:5432:5432']
    entrypoint: '/init/entry.sh'
    volumes:    ['./testdata/init:/init']
    shm_size:   '128mb'
    user: 'root'
    environment:
      'POSTGRES_DATABASE': 'pqgo'
      'POSTGRES_USER':     'pqgo'
      'POSTGRES_PASSWORD': 'unused'
  pg16:
    profiles:   ['pg16']
    image:      'postgres:16'
    ports:      ['127.0.0.1:5432:5432']
    entrypoint: '/init/entry.sh'
    volumes:    ['./testdata/init:/init']
    shm_size:   '128mb'
    environment:
      'POSTGRES_DATABASE': 'pqgo'
      'POSTGRES_USER':     'pqgo'
      'POSTGRES_PASSWORD': 'unused'
  pg15:
    profiles:   ['pg15']
    image:      'postgres:15'
    ports:      ['127.0.0.1:5432:5432']
    entrypoint: '/init/entry.sh'
    volumes:    ['./testdata/init:/init']
    shm_size:   '128mb'
    environment:
      'POSTGRES_DATABASE': 'pqgo'
      'POSTGRES_USER':     'pqgo'
      'POSTGRES_PASSWORD': 'unused'
  pg14:
    profiles:   ['pg14']
    image:      'postgres:14'
    ports:      ['127.0.0.1:5432:5432']
    entrypoint: '/init/entry.sh'
    volumes:    ['./testdata/init:/init']
    shm_size:   '128mb'
    environment:
      'POSTGRES_DATABASE': 'pqgo'
      'POSTGRES_USER':     'pqgo'
      'POSTGRES_PASSWORD': 'unused'
