services:
   postgres-db:
      image: kartoza/postgis
      ports:
         - 5432:5432
      volumes:
         - postgres_data:/var/lib/postgresql
         - ./custom-postgresql.conf:/etc/postgresql/12/main/postgresql.conf
         - ./rogaining.sql:/sql/rogaining.sql
      environment:
         - POSTGRES_USER=${POSTGRES_USER}
         - POSTGRES_PASS=${POSTGRES_PASS}
         - POSTGRES_DBNAME=${POSTGRES_DBNAME}
         - POSTGRES_MAX_CONNECTIONS=600
      restart: "on-failure"
volumes:
   postgres_data: